19 lines
607 B
PHP
19 lines
607 B
PHP
<?php
|
|
|
|
//скачивает весь ассортимент в json
|
|
$curl = curl_init('https://api.samsonopt.ru/v1/sku/?api_key=3f8f720d5a2923a1ff02be994090b002&pagination_page=3');
|
|
$arHeaderList = array();
|
|
$arHeaderList[] = 'Accept: application/json';
|
|
$arHeaderList[] = 'User-Agent: string';
|
|
$arHeaderList[] = 'Accept-Encoding: gzip';
|
|
|
|
|
|
curl_setopt($curl, CURLOPT_HTTPHEADER, $arHeaderList);
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
|
|
curl_setopt($curl, CURLOPT_ENCODING, 'gzip');
|
|
$result = curl_exec($curl);
|
|
curl_close($curl);
|
|
|
|
print_r($result);
|
|
?>
|