Pretty short and simple script to be inserted into website. This is to send a sms message via a http call, loops over for as many names are listed in the text box and inserts the response of the http post to an existing mysql database.
1 Form will have 3 elements
1)TO = Text area = 10 digit numbers separated by comma (FROM will be parsed from page no form piece is needed) strings longer than 10 digits will be discarded
2)A text area (text limiting script provided)
3)Submit Button
Text button will then loop over as many 10 digit strings there are to a http string and replace spaces with % post the result to a mysql database already created, provided
The script will be similar to this format
[login to view URL](USERNAME)s&password=%(PASSWORD)s&from=+%(FROM)s&to=+%(TO)s&text=%(TEXT)s"""
The script will have to be formatted using somethign similar to this... (this is part of another python script)
TEXT=[login to view URL](' ','%20').replace('\t','%20').replace('\r\n','%0D').replace('\r','%0D').replace('\n','%0D')
Responses are
Successfull SMS:
<?xml version="1.0" encoding="utf-8" ?>
- <SmsResponse>
<version>1</version>
<result>1</result>
<resultstring>success</resultstring>
<description />
<endcause />
</SmsResponse>
Invalid number:
<?xml version="1.0" encoding="utf-8" ?>
- <SmsResponse>
<version>1</version>
<result>0</result>
<resultstring>failure</resultstring>
<description>Invalid Number</description>
<endcause>19</endcause>
</SmsResponse>
Do not know if should queue this, or post while user is waiting?