PHP curl json for twitter not working -


this code 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 try access: https://api.twitter.com/1/statuses/user_timeline/ijustine.json?callback=twittercallback2&count=4

from browser typing address manually works , json displayed in browser.

but in script it's not working.

i using wamp , curl extension in php (5.3.13) activated because if run: var_dump( curl_version() ); array version 7.25.0.

btw. working: $ch = curl_init ("http://yahoo.com");

curl_setopt ($ch, curlopt_returntransfer, true);  $output = curl_exec ($ch);  var_dump($output); 

but if try access http://twitter.com string '' (length=0). , if try https://twitter.com boolean false why?

do need enable additional php extensions or apache modules on localhost or else?

this https certificate issue; check past question: can't connect https site using curl. returns 0 length content instead. can do?


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -