Created
September 24, 2010 20:52
-
-
Save harperreed/596020 to your computer and use it in GitHub Desktop.
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 | |
/* | |
Easy to use sms notifications from Notifo | |
Super quick hack by Harper - @harper - [email protected] | |
First: | |
-------------- | |
Get Google-Voice-PHP-API: | |
http://github.com/aaronpk/Google-Voice-PHP-API | |
Go ahead and do a: | |
git clone http://github.com/aaronpk/Google-Voice-PHP-API.git | |
in the dir where this script resides | |
Second: | |
-------------- | |
Go here: | |
http://notifo.com/user/settings/notifications | |
and enter the url for this script in the webhooks url box | |
Third: | |
-------------- | |
Enter your username and password down below (this is super annoying and insecure - but whatevers) | |
Fourth: | |
-------------- | |
Enter your mobile number below | |
Fifth: | |
-------------- | |
Go here and send a test alert: | |
http://notifo.com/user/setup | |
(scroll down a bit to the "send test alert" button) | |
DONE! WHEEEEEE! | |
If all worked - you should get a "Notifo is setup correctly" | |
Notes: | |
* You probably want to keep the URL of this script secret ;) | |
* If there is a way to grab an auth token and not user cleartext password - let me know. | |
* this is pretty featureless. i am sure there is room for improvement. IMPROVE IT | |
* follow @harper for more hacks | |
*/ | |
/* -------------------- */ | |
/* EDIT ME: */ | |
$username = "first.last"; // your google voice account | |
$password = "sup3rs3curepassw0rd"; //your google account password (in cleartext!) | |
$target_mobile_number = "XXXYYYZZZZ"; //your mobile number | |
/* -------------------- */ | |
include('Google-Voice-PHP-API/GoogleVoice.php'); | |
$gv = new GoogleVoice($username, $password); | |
$sms_message = $_POST['notifo_message']; | |
$gv->sendSMS($target_mobile_number, $sms_message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment