Skip to content

Instantly share code, notes, and snippets.

@max
Created January 30, 2011 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save max/802683 to your computer and use it in GitHub Desktop.
Save max/802683 to your computer and use it in GitHub Desktop.
<?php
function get_content_url($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
$json = curl_exec($ch);
curl_close($ch);
return $json;
}
echo get_content_url('http://cl.ly/2wr4');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment