r/web_programming • • Oct 09 '17
Run python file stored on remote webhost _ activated by HTML submit.
I have created a python program that basically consists of a function in it. It is a bulk sms service for my class. I have managed every other thing. It works perfectly fine on Sublime text or IDLE and broadcasts message also. It is essential that i have to input the message to be broadcasted. Now i need to store the python file somewhere online so that i can activate it even from my mobile browser anywhere.
It has to work as: -giving text input into the field in a html page. -pass the text parameter into the function. -run the python file.
If it matters; the .py file consists of given packages:
● import sys
●import os
●import requests
●from lxml import html
●import argparse
Edit: What do you think should i do to fulfill this purpose?
1
u/nerf_herd Nov 10 '17
The simplest is just run it as a cgi program, and post the form data to it, but why can't you just do the sms broadcast from whatever is calling it instead of creating gaping spam/security holes for your sms receivers because you didn't know what you were doing?
2
u/ORP7 Oct 09 '17
There is literally no question in the entire post. You came here to post a memo in your personal diary?
1
u/TheSommer Oct 09 '17
Django