This code is not working:
$ch = curl_init ("https://api.twitter.com/1/statuses/user_timeline/ijustine.json?callback=twitterCallback2&count=4");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec ($ch);
var_dump($output);
If I try to access:
https://api.twitter.com/1/statuses/user_timeline/ijustine.json?callback=twitterCallback2&count=4
From a browser by typing this address manually it works and json is displayed in browser.
But in my script it's not working.
I am using WAMP and curl extension in PHP (5.3.13) is activated because if I run: var_dump( curl_version() );
I get the array where version is 7.25.0.
Btw. this is working: $ch = curl_init ("http://yahoo.com");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec ($ch);
var_dump($output);
But if I try access http://twitter.com
I get string '' (length=0)
. And if I try https://twitter.com
I get boolean false
Why?
Do I need to enable any additional php extensions or some apache modules on my localhost or something else?