Skip to content

Instantly share code, notes, and snippets.

@rantastic
Created April 11, 2013 15:23
Show Gist options
  • Save rantastic/5364294 to your computer and use it in GitHub Desktop.
Save rantastic/5364294 to your computer and use it in GitHub Desktop.
PHP: Simple CURL
$ch = curl_init($url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
$a = curl_exec($ch);
$youtubeJSON=json_decode($a,true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment