Skip to content

Instantly share code, notes, and snippets.

@brodul
Created April 19, 2012 12:43
Show Gist options
  • Save brodul/2420764 to your computer and use it in GitHub Desktop.
Save brodul/2420764 to your computer and use it in GitHub Desktop.
<?php
//$url = 'http://www.reddit.com/r/linux/comments/s5s5i/skype_alternatives_for_linux/.json';
$url = 'http://api.themoviedb.org/2.1/Movie.search/en/json/075345/transpor';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
// XXX no timeout set danger
$json_text = curl_exec($ch);
curl_close($ch);
$json_array = json_decode($json_text);
print var_dump($json_array);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment