removing ad - sms python script <Solved>

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
leef

removing ad - sms python script <Solved>

Post by leef »

it functions fine (due to help from people at on this forum). i'd now like to remove the ad that is automatically appended to the sent text message which reads 'Send free TXT Msgs @ http://www.onlinetextmessage.com' if it's even possible.

Code: Select all

import urllib
import urllib2

number = raw_input("Please Enter The Phone Number:\n")
message = raw_input("Please Enter Your Message:\n")
prov = ''
url2 = 'http://www.txt2day.com/lookup.php'
url = 'http://www.onlinetextmessage.com/send.php'
values2 = {'action' : 'lookup',
           'pre' : number[0:3],
           'ex' : number[3:6],
           'myButton' : 'Find Provider'}
data2 = urllib.urlencode(values2)  ##provider checker
req2 = urllib2.Request(url2, data2)
response2 = urllib2.urlopen(req2)
the_page2 = response2.read()
if 'Telus' in the_page2:
    prov = '192'
if 'Bell' in the_page2:
    prov = '48'
if 'Rogers' in the_page2:
    prov = '162'
if 'Sprint' in the_page2:
    prov = '175'
if 'T-Mobile' in the_page2:
    prov = '182'
if 'Verizon' in the_page2:
    prov = '203'
if 'Virgin Mobile' in the_page2:
    prov = '205'
if 'Att' in the_page2:
    prov = '41'
if 'Boost' in the_page2:
    prov = '54'
print prov
if prov == '':
    print "Failed To Identify Provider\n"
    exit
values = {'code' : '',
          'number' : number,
          'from' : '', ##input email address 
          'remember' : 'n',
          'subject' : '',
          'carrier' : prov,
          'quicktext' : '',
          'message' : message,
          's' : 'Send Message'}
data = urllib.urlencode(values)  ##text sender
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
the_page = response.read() 
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
passerby

Re: removing ad - sms python script

Post by passerby »

The text is appended after you've sent the message, right? In that case, there's nothing you can do about it.
Once you've sent the message to http://www.onlinetextmessage.com/send.php, they can do whatever they see fit to your SMS message before actually sending it, and there's nothing you can do about it.
leef

Re: removing ad - sms python script

Post by leef »

As I suspected. Thanks.
jmdeking

Re: removing ad - sms python script <Solved>

Post by jmdeking »

Hi there,

What do they do with your phone number? is it free because you receive other adds or they sell your phone number?

Sorry for the offtopic question.
Locked

Return to “Scripts & Bash”