PHP code example of dmmcomlabo / dmm-sdk-v3
1. Go to this page and download the library: Download dmmcomlabo/dmm-sdk-v3 library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dmmcomlabo / dmm-sdk-v3 example snippets
$dmm = new \Dmm\Dmm([
"affiliate_id" => "YOUR-AFFILIATE-ID",
"api_id" => "YOUR-API-ID",
]);
// 商品検索APIを使用する場合
$keyword = 'ナース';
$response = $dmm->api("product")->find(Dmm\Apis\Product::SITE_ADULT, [
'keyword' => $keyword
]);
$result = $response->getDecodedBody();
print_r($result);