final, working project
Dependencies: C12832 EthernetInterface HTTPClient Speaker USBDevice mbed-rtos mbed
Diff: proxy.php
- Revision:
- 2:59edfc0fd52f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/proxy.php Fri Feb 12 13:11:08 2016 +0000 @@ -0,0 +1,25 @@ +<?php +require('codebird.php'); +$date = new DateTime(); + +$msg = "Something went wrong"; + +//$msg = $_GET['msg'] . " // " . $date->getTimestamp(); +$msg = "Score: " . $_GET['msg'] . " // " . date('Y-m-d', strtotime('+8 hours')) . " - " . date('h:i:sa', strtotime('+8 hours')) . " #snakeGame #teamSweden" ; +// Set keys +$consumerKey = 'XHO3e2fiS44d5i7xc6mvtvDdZ'; +$consumerSecret = '9U4WOjRnpM5Pj0Qv4f6406jTRfN65YY5GeE5PRXHuhPfSiWhEN'; +$accessToken = '4761221959-n4ojXEYR4DZSA4eeqt1WetVHHrZWTUNLJJ9ql3o'; +$accessTokenSecret = 'SXM05FPIW9SUgTYYgpk4buPcypwXIsLDIY3TRns01WRJP'; + +\Codebird\Codebird::setConsumerKey($consumerKey, $consumerSecret); +$cb = \Codebird\Codebird::getInstance(); +$cb->setToken($accessToken, $accessTokenSecret); + +$params = array( + 'status' => $msg +); + +$reply = $cb->statuses_update($params); +?> +