Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2014
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1. if($_GET['auth'] == 'my super secret password ;D'){
  2.     require_once 'config.php';
  3.     require_once 'mirror-client.php';
  4.     require_once 'google-api-php-client/src/Google_Client.php';
  5.     require_once 'google-api-php-client/src/contrib/Google_MirrorService.php';
  6.     require_once 'util.php';
  7.  
  8.     $client = get_google_api_client();
  9.     $client->setAccessToken('{"access_token":"blah","token_type":"Bearer","expires_in":3600,"id_token":"blah","refresh_token":"blah","created":1391407325}');
  10.     $new_timeline_item = new Google_TimelineItem();
  11.     $new_timeline_item->setText($_GET['message']);
  12.  
  13.     $notification = new Google_NotificationConfig();
  14.     $notification->setLevel("DEFAULT");
  15.     $new_timeline_item->setNotification($notification);
  16.  
  17.     $mirror_service = new Google_MirrorService($client);
  18.     insert_timeline_item($mirror_service, $new_timeline_item, null, null);
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement