if($url = file_get_contents("https://api.twitter.com/1/statuses/user_timeline.json?screen_name=".$user)){}
else die("Invalid User");
Is this a good way to run this script?
if($url = file_get_contents("https://api.twitter.com/1/statuses/user_timeline.json?screen_name=".$user)){}
else die("Invalid User");
Is this a good way to run this script?
I'm not sure what you mean, but if you ask if your call of file_get_contents
is correct, then I must say yes, because, as stated here:
On failure, file_get_contents() will return FALSE.