Skip to content

inwtech/codeinthedark-text-to-vote

 
 

Repository files navigation

Text-to-Vote

Text-to-Vote is a simple web app that allows you to do realtime polling through SMS.

Text-to-Vote works with the Twilio API, so you'll need an account and phone number at Twilio before you can get started. Twilio sells simple, pay as you go phone services, and you can sign up for a free account with $30 of free credits at http://www.twilio.com.

Installation

Installation of Text-to-Vote is as simple as copying the folder, making it writeable, editing the configuration file, creating the database and pointing Twilio to the correct handlers.

  1. Copy the folder to your server.

  2. Make the folder writeable.

  3. Edit /include/config.php

  4. Run create_database.php by browsing to http://yourserver/Text-to-Vote/create_database.php

  5. Go to your Twilio numbers page and point the Voice URL to http://yourserver/Text-to-Vote/handle_incoming_call.xml (leave the default POST method selected) and point the SMS URL to http://yourserver/Text-to-Vote/handle_incoming_sms.php

Local Usage

Assuming PHP is installed locally and you're running on a mac, the following command should work for you to run the system locally: php -S localhost:9001

You can then view the voting results by visiting localhost:9001

You run the following command in a separate terminal window to create an ngrok tunnel so that you have a public URL available that you can use within Twilio to receive real webhooks: ./ngrok http localhost:9001

License

Copyright (C) 2011 Rahim Sonawalla (rahim@twilio.com / @rahims) and Will Light (wrl@illest.net / @dudestache).

Released under the MIT license.

About

A simple web app that allows you to do realtime polling using SMS messages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 75.6%
  • CSS 24.4%