- In a python environment that has pip installed, do
pip install twilio
thenpip install phonenumbers
. - Do
python risky-account-finder.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This function will take a number in a variety of formats and reformat | |
* the number to be in E.164 format. Currently this is really, really ugly, | |
* but it works. substr() based function might also work. Currently US only. | |
*/ | |
function normalizeNumber($number) { | |
$number = trim($number); | |
$number = preg_replace("/[^A-Za-z0-9]/", '', $number); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This script requires a Twilio Account and the Twilio PHP Helper Library, | |
* which can be found at http://www.twilio.com/docs/libraries | |
*/ | |
// Require Twilio Helper Library | |
require('Services/Twilio.php'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---- Setting up this script ---- | |
1) Upload these files to a location that is publicly accessible on the internet. | |
2) Enter the URL of the file named "index.xml" into the Voice Request URL of the number you want to setup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="form_to_sms.php" method="post"> | |
<label for="phone">Phone Number</label> | |
<input type="tel" name="phone"/><br/> | |
<label for="body">Message Body</label> | |
<textarea name="body" maxlength="160"></textarea><br/> | |
<input type="submit" /> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$twilio_welcome_message = "Welcome to Twilio SMS. Configure your number's SMS URL to change this message. Reply HELP for help. Reply STOP to unsubscribe. Msg&Data rates may apply."; | |
if($_RESPONSE['Body'] != $twilio_welcome_message){ | |
echo("<Sms>Welcome to Twilio SMS. Configure your number's SMS URL to change this message. Reply HELP for help. Reply STOP to unsubscribe. Msg&Data rates may apply.</Sms>"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db = new PDO('sqlite:database.sqlite'); | |
// Create the SQLite table. | |
$db->exec('CREATE TABLE gather_date (id INTEGER PRIMARY KEY, call_sid TEXT(32), year TEXT(4), month TEXT(2), day TEXT(2));'); | |
// Populate it with some data | |
$db->exec("INSERT INTO gather_date (call_sid, year, month, day) VALUES ('fhsdhfiuh', '2010', '09', '01');"); | |
if (file_exists('database.sqlite')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Include the offical Twilio PHP Helper Library, which can be found at | |
* http://www.twilio.com/docs/libraries | |
*/ | |
include 'Services/Twilio.php'; | |
// Your Twilio Credentials | |
$accountSid = 'AC1987654gef...'; // Replace with your own Account Sid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Sending SMS messages from a pool of numbers | |
// Load the Twilio PHP Helper Library | |
// This library can be downloaded from: https://github.com/twilio/twilio-php | |
require('Services/Twilio.php'); | |
// Fill in your account credentials | |
$sid = "ACXXXXXXX"; // Your Account SID from www.twilio.com/user/account | |
$token = "YYYYYYY"; // Your Auth Token from www.twilio.com/user/account |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Download the library from: https://github.com/twilio/twilio-php | |
* Copy the 'Services' folder into a directory containing this file. | |
*/ | |
require('Services/Twilio.php'); | |
$account_sid = "ACXXXXXXXXXXX"; // Your Twilio account sid | |
$auth_token = "YYYYYYYYYYYY"; // Your Twilio auth token |
OlderNewer