php - file_get_contents() 'failed to open stream' error retrieving tweets -
i trying create simple script retrieve last 5 feeds twitter user (in instance bbc)
it runs okay locally on development server once upload live site following error:
warning: file_get_contents(https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=bbc&count=5): failed open stream: http request failed! http/1.0 400 bad request in ....
does know why doesn't work on live server (but fine on dev server?)
as mentioned in file_get_contents throws 400 bad request error php, may better using curl instead of file_get_contents due improved error handling - may provide clue.
Comments
Post a Comment