Skip to content

Instantly share code, notes, and snippets.

@summic
Forked from phatduckk/appsearch-example.php
Created July 12, 2011 05:29
Show Gist options
  • Save summic/1077444 to your computer and use it in GitHub Desktop.
Save summic/1077444 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