Skip to content

Instantly share code, notes, and snippets.

@Mistat
Created February 27, 2012 06:43
Show Gist options
  • Save Mistat/1921971 to your computer and use it in GitHub Desktop.
Save Mistat/1921971 to your computer and use it in GitHub Desktop.
Rakuten Web service books search smapo
<?php
$doc = simplexml_load_file('http://api.rakuten.co.jp/rws/3.0/rest?developerId=12657057e6e263dfe5dd57b5565078da&operation=BooksCDSearch&version=2011-12-01&artistName=AI');
$doc->registerXPathNamespace('booksCDSearch', 'http://api.rakuten.co.jp/rws/rest/BooksCDSearch/2011-12-01');
foreach ($doc->xpath('Body/booksCDSearch:BooksCDSearch/Items/Item') as $item) {
echo $item->title, "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment