removing ad - sms python script <Solved>

Forum rules
Before you post please read this

removing ad - sms python script <Solved>

Postby leef on Sat Feb 22, 2014 7:06 pm

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 leef on Sun Mar 02, 2014 9:24 pm, edited 1 time in total.
leef
Level 1
Level 1
 
Posts: 7
Joined: Sun Dec 30, 2012 6:40 pm

Linux Mint is funded by ads and donations.
 

Re: removing ad - sms python script

Postby passerby on Mon Feb 24, 2014 1:52 am

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.
Home PC: Xubuntu 14.04 x64, Nvidia GTX650, i7 3770K, 16GB RAM, Asus Xonar DX
Work PC: Mint 13 x64 XFCE, Nvidia GT620, i5 3470, 8GB RAM
Laptop: System76 Kudu Pro, Xubuntu 14.04 x64

My HTML5 login themes + screenshots
User avatar
passerby
Level 6
Level 6
 
Posts: 1375
Joined: Sun Dec 16, 2012 7:29 pm

Re: removing ad - sms python script

Postby leef on Sun Mar 02, 2014 9:23 pm

As I suspected. Thanks.
leef
Level 1
Level 1
 
Posts: 7
Joined: Sun Dec 30, 2012 6:40 pm

Re: removing ad - sms python script <Solved>

Postby jmdeking on Mon Mar 17, 2014 10:05 am

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.
jmdeking
Level 2
Level 2
 
Posts: 58
Joined: Sun Jul 15, 2012 7:59 am


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 3 guests