core/parcer/samson/fool.php

19 lines
607 B
PHP
Raw Normal View History

2023-07-12 20:02:20 +05:00
<?php
2023-08-14 09:15:58 +05:00
//скачивает весь ассортимент в json
$curl = curl_init('https://api.samsonopt.ru/v1/sku/?api_key=3f8f720d5a2923a1ff02be994090b002&pagination_page=3');
2023-07-12 20:02:20 +05:00
$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);
?>