Cannot use file_get_contents to connect to an https url; use cURL instead.
This commit is contained in:
parent
109be86bad
commit
61b1aac452
1 changed files with 4 additions and 4 deletions
|
@ -23,7 +23,7 @@ define('LOCK',$conf->site->path . '/data/whoisandrew.lock');
|
||||||
// All the sources we intend on pulling data from with a corresponding
|
// All the sources we intend on pulling data from with a corresponding
|
||||||
// cache lifetime.
|
// cache lifetime.
|
||||||
$dataSources = array(
|
$dataSources = array(
|
||||||
'twitter' => 300,
|
'twitter' => 0, //300,
|
||||||
'github' => 300,
|
'github' => 300,
|
||||||
'hulu' => 600,
|
'hulu' => 600,
|
||||||
'lastfm' => 60,
|
'lastfm' => 60,
|
||||||
|
@ -73,9 +73,9 @@ file_put_contents(DATA,json_encode($sourceData));
|
||||||
// Data sources
|
// Data sources
|
||||||
//***************************************************************************//
|
//***************************************************************************//
|
||||||
function twitter() {
|
function twitter() {
|
||||||
$url = 'http://www.twitter.com/statuses/user_timeline/atomaka.json?count=1&include_rts=true';
|
$url = 'https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=atomaka&count=1';
|
||||||
$tweetInfo = json_decode(file_get_contents($url));
|
$tweetInfo = json_decode(curl_request($url));
|
||||||
|
|
||||||
// An empty result set currently (always?) means that the last post was
|
// An empty result set currently (always?) means that the last post was
|
||||||
// retweeted.
|
// retweeted.
|
||||||
if(empty($tweetInfo)) {
|
if(empty($tweetInfo)) {
|
||||||
|
|
Loading…
Reference in a new issue