Skip to content

Instantly share code, notes, and snippets.

@nobodyplace
Last active June 14, 2021 08:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nobodyplace/212a4e5739aed0e4b91e to your computer and use it in GitHub Desktop.
Save nobodyplace/212a4e5739aed0e4b91e to your computer and use it in GitHub Desktop.
楽天 RMS API Sample
require_once 'HTTP/Client.php';
$client = new HTTP_Client(null, array(
'Authorization' => 'ESA ' . base64_encode(/* serviceSecret */ . ':' . /* licenseKey */)
));
$client->get(
'https://api.rms.rakuten.co.jp/es/1.0/item/get',
array(
'itemUrl' => $itemUrl
)
);
$response = $client->currentResponse();
$result = simplexml_load_string($response['body']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment