Skip to content

Instantly share code, notes, and snippets.

@RobSpectre
Created May 24, 2012 18:34
Show Gist options
  • Save RobSpectre/2783355 to your computer and use it in GitHub Desktop.
Save RobSpectre/2783355 to your computer and use it in GitHub Desktop.
$50 SMS poll winner
# A SMS Ballot Stuffer
# Warning: this code will cost you fifty dollars.
from twilio.rest import TwilioRestClient
client = TwilioRestClient("ACxxxxxxxxxxx", "yyyyyyyyyyyyyy")
target_number = "+15558675309"
confirm = raw_input("Are you seriously going to pay $50 to win a SMS poll? [y/n]")
if confirm == "y":
print "Arright dude. Whatever you say..."
for i in range(50):
number = client.phone_numbers.purchase(area_code="415")
client.sms.messages.create(from_=number.phone_number, to=target_number, body="1")
print "%i votes: cast from %s..." % (i, number.phone_number)
else:
print "Good thing."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment