Skip to content

Instantly share code, notes, and snippets.

@phatduckk
Created December 9, 2009 07:05
Show Gist options
  • Save phatduckk/252317 to your computer and use it in GitHub Desktop.
Save phatduckk/252317 to your computer and use it in GitHub Desktop.
<?php
if (! isset($argv[1])) {
echo "enter a search term:\n";
echo 'php ' . __FILE__ . " <search_term>\n";
exit;
}
$term = urlencode($argv[1]);
$url = "http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsSearch?limit=10&entity=software&term=$term";
$json = file_get_contents($url);
print_r(json_decode($json, true));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment