Skip to content

Instantly share code, notes, and snippets.

@koconder
Forked from zaru/sample.php
Created February 7, 2013 12:59
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 koconder/4730757 to your computer and use it in GitHub Desktop.
Save koconder/4730757 to your computer and use it in GitHub Desktop.
<?php
//検索キーワード
$keyword = 'アプリ';
$uri = 'http://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?term=' . urlencode($keyword) . '&media=software';
$context = stream_context_create(array('http' => array(
'method' => 'GET',
'header' =>
'User-Agent: iTunes-iPhone/4.2.1 (2; 8GB)' . "\r\n"
. 'X-Apple-Store-Front: 143462-9,2' . "\r\n"
,
)));
$data = file_get_contents($uri, false, $context);
echo $data;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment