Last active
August 29, 2015 14:28
-
-
Save davidkryzaniak/c54bc9fc5b05ad7eefe3 to your computer and use it in GitHub Desktop.
Revisions
-
davidkryzaniak revised this gist
Aug 23, 2015 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,24 +10,24 @@ // Load Composer require_once('../vendor/autoload.php'); //if the type is set to "twitter" and the msg is not empty if(isset($_GET['type']) && "twitter" == $_GET['type'] && isset($_GET['msg']) && !empty($_GET['msg'])){ //prepend a timestamp to the message $message = '['.date('Y-m-d H:i:s').'] '.urldecode($_GET['msg']); // Using dg's twitter library - https://github.com/dg/twitter-php $twitter = new Twitter( 'ConsumerKey', 'ConsumerSecret', 'AccessToken', 'AccessTokenSecret' ); //post it to Twitter $twitter->send($message); } } -
davidkryzaniak revised this gist
Aug 23, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ //prepend a timestamp to the message $message = '['.date('Y-m-d H:i:s').'] '.urldecode($_GET['msg']); // Using dg's twitter library - https://github.com/dg/twitter-php $twitter = new Twitter( 'ConsumerKey', 'ConsumerSecret', -
davidkryzaniak revised this gist
Aug 23, 2015 . No changes.There are no files selected for viewing
-
davidkryzaniak revised this gist
Aug 23, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ require_once('../vendor/autoload.php'); //if the type is set to "twitter" and the msg is not empty if(isset($_GET['type']) && "twitter" == $_GET['type'] && isset($_GET['msg']) && !empty($_GET['msg'])){ //prepend a timestamp to the message $message = '['.date('Y-m-d H:i:s').'] '.urldecode($_GET['msg']); -
davidkryzaniak created this gist
Aug 23, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ <?php error_reporting(E_ALL); ini_set('display_errors', 1); $ua = $_SERVER['HTTP_USER_AGENT']; //User agent must be set to "**MY-SECRET-USER-AGENT**" and the ?secret must be "key" if("**MY-SECRET-USER-AGENT**" == $ua && isset($_GET['secret']) && "key" == $_GET['secret']){ // Load Composer require_once('../vendor/autoload.php'); //if the type is set to "twitter" and the msg is not empty if("twitter" == isset($_GET['type']) && $_GET['type'] && isset($_GET['msg']) && !empty($_GET['msg'])){ //prepend a timestamp to the message $message = '['.date('Y-m-d H:i:s').'] '.urldecode($_GET['msg']); // Using dg's twitter library - https://github.com/dg/twitter-php $twitter = new Twitter( 'ConsumerKey', 'ConsumerSecret', 'AccessToken', 'AccessTokenSecret' ); //post it to Twitter $twitter->send($message); } }