я думаю проще всего будет просто брать и отправлять этот же самый запрос. Если встаёт вопрос "как отправлять запрос", то для начала определитесь как вам это будет удобно в ваших условиях, а потом составьте запрос на основе тех данных которые вам дают инструменты разработчика: там есть очень крутой функционал копирования запроса, надо нажать правой кнопкой на запрос и выбрать нужный формат.
curl "https://ofd.nalog.ru/search-proc.json"
- H "Sec-Fetch-Mode: cors"
- H "Origin: https://ofd.nalog.ru"
- H "Accept-Encoding: gzip, deflate, br"
- H "Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
- H "X-Requested-With: XMLHttpRequest"
- H "Cookie: _ym_uid=1559550956125437272; _ym_d=1559550956; _ga=GA1.2.899122039.1560429815; top100_id=t1.-1.760106474.1561622629137; last_visit=1567586822127::1567597622127; _ym_isad=2; _ym_visorc_23729197=w; JSESSIONID=B01A40C97FA5EDF96137A187C59315A1" - H "Connection: keep-alive" - H "Pragma: no-cache" - H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36" - H "Content-Type: application/x-www-form-urlencoded" - H "Accept: application/json, text/javascript, */*; q=0.01" - H "Cache-Control: no-cache" - H "Referer: https://ofd.nalog.ru/index.html" - H "Sec-Fetch-Site: same-origin"--data "mode=quick^&page=^&query=5187746013934^&pageSize=10^&sortField=NAME_EX^&sort=ASC"--compressedcurl "https://ofd.nalog.ru/search-proc.json" - H "Sec-Fetch-Mode: cors" - H "Origin: https://ofd.nalog.ru" - H "Accept-Encoding: gzip, deflate, br" - H "Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7" - H "X-Requested-With: XMLHttpRequest" - H "Cookie: _ym_uid=1559550956125437272; _ym_d=1559550956; _ga=GA1.2.899122039.1560429815; top100_id=t1.-1.760106474.1561622629137; last_visit=1567586822127::1567597622127; _ym_isad=2; _ym_visorc_23729197=w; JSESSIONID=B01A40C97FA5EDF96137A187C59315A1"
- H "Connection: keep-alive"
- H "Pragma: no-cache"
- H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
- H "Content-Type: application/x-www-form-urlencoded"
- H "Accept: application/json, text/javascript, */*; q=0.01"
- H "Cache-Control: no-cache"
- H "Referer: https://ofd.nalog.ru/index.html"
- H "Sec-Fetch-Site: same-origin"--data "mode=quick^&page=^&query=1192225018655^&pageSize=10^&sortField=NAME_EX^&sort=ASC"--compressed
<?php
class Pars
{
private $url_pars;
private $ch;
public function __construct($print = false) {
$headers = array (
"Content-Type:text/html; charset=utf-8",
);
$this->ch = curl_init();
if (!$print) {
curl_setopt($this->ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($this->ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36');
curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);
}
}
public function set($name, $value) {
curl_setopt($this->ch, $name, $value);
return $this;
}
public function exec($url_pars) {
curl_setopt($this->ch, CURLOPT_URL, $url_pars);
return curl_exec($this->ch);
}
public function __destruct() {
curl_close($this->ch);
}
}
public static function checkExistsCompanyRegisterSandMEnterprises () {
$obParseData = new Pars();
$url_pars = 'https://ofd.nalog.ru/index.html#pnlSearchResult';
$obPQDoc = phpQuery::newDocument($obParseData->exec($url_pars));
$obPQDoc->find('#tblResultData');
$strValueFindData = pq($obPQDoc);
var_dump($strValueFindData);
}
mode=quick^&page=^&query=1192225018655^&pageSize=10^&sortField=NAME_EX^&sort=ASC
$url_pars = 'mode=quick^&page=^&query=1192225018655^&pageSize=10^&sortField=NAME_EX^&sort=ASC';
$url_pars = 'mode=quick^&page=^&query=' . $ogrn . '^&pageSize=10^&sortField=NAME_EX^&sort=ASC';
public static function checkExistsCompanyRegisterSandMEnterprises ($url_pars) {
$obParseData = new Pars();
$obPQDoc = phpQuery::newDocument($obParseData->exec($url_pars));
$obPQDoc->find('#tblResultData');
$strValueFindData = pq($obPQDoc);
var_dump($strValueFindData);
}
curl "https://ofd.nalog.ru/search-proc.json"
- H "Sec-Fetch-Mode: cors"
- H "Origin: https://ofd.nalog.ru"
- H "Accept-Encoding: gzip, deflate, br"
- H "Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
- H "X-Requested-With: XMLHttpRequest"
- H "Cookie: _ym_uid=1559550956125437272; _ym_d=1559550956; _ga=GA1.2.899122039.1560429815; top100_id=t1.-1.760106474.1561622629137; last_visit=1567586822127::1567597622127; _ym_isad=2; _ym_visorc_23729197=w; JSESSIONID=B01A40C97FA5EDF96137A187C59315A1" - H "Connection: keep-alive" - H "Pragma: no-cache" - H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36" - H "Content-Type: application/x-www-form-urlencoded" - H "Accept: application/json, text/javascript, */*; q=0.01" - H "Cache-Control: no-cache" - H "Referer: https://ofd.nalog.ru/index.html" - H "Sec-Fetch-Site: same-origin"--data "mode=quick^&page=^&query=5187746013934^&pageSize=10^&sortField=NAME_EX^&sort=ASC"--compressedcurl "https://ofd.nalog.ru/search-proc.json" - H "Sec-Fetch-Mode: cors" - H "Origin: https://ofd.nalog.ru" - H "Accept-Encoding: gzip, deflate, br" - H "Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7" - H "X-Requested-With: XMLHttpRequest" - H "Cookie: _ym_uid=1559550956125437272; _ym_d=1559550956; _ga=GA1.2.899122039.1560429815; top100_id=t1.-1.760106474.1561622629137; last_visit=1567586822127::1567597622127; _ym_isad=2; _ym_visorc_23729197=w; JSESSIONID=B01A40C97FA5EDF96137A187C59315A1"
- H "Connection: keep-alive"
- H "Pragma: no-cache"
- H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
- H "Content-Type: application/x-www-form-urlencoded"
- H "Accept: application/json, text/javascript, */*; q=0.01"
- H "Cache-Control: no-cache"
- H "Referer: https://ofd.nalog.ru/index.html"
<?php
class ParsNalog
{
private $url_pars;
private $ch;
public $numberOGRN;
public function __construct($print = false) {
$headers = array (
"accept:application/json, text/javascript, */*; q=0.01",
"accept-language:ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7",
"cache-control:no-cache",
"content-type:application/x-www-form-urlencoded",
"pragma:no-cache",
"sec-fetch-mode:cors",
"sec-fetch-site:same-origin",
"x-requested-with:XMLHttpRequest"
);
$body = "mode=quick&page=1&query=1192225018655&pageSize=10&sortField=NAME_EX&sort=ASC";
$this->ch = curl_init();
if (!$print) {
curl_setopt($this->ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($this->ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36');
curl_setopt($this->ch, CURLOPT_REFERER, "https://ofd.nalog.ru/index.html");
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);
}
}
public function set($name, $value) {
curl_setopt($this->ch, $name, $value);
return $this;
}
public function exec($url_pars) {
curl_setopt($this->ch, CURLOPT_URL, $url_pars);
return curl_exec($this->ch);
}
public function __destruct() {
curl_close($this->ch);
}
}
public static function checkExistsCompanyRegisterSandMEnterprises () {
$obParseData = new ParsNalog();
$url_pars = 'https://ofd.nalog.ru/index.html#pnlSearchResult';
$obPQDoc = phpQuery::newDocument($obParseData->exec($url_pars));
$obPQDoc->find('#tblResultData');
$strValueFindData = pq($obPQDoc);
echo '<<<<< '. $strValueFindData->find('.rsmp-result span')->text() .' >>>>>';
//var_dump($strValueFindData);
}
<?php
class ParsNalog
{
private $url_pars;
private $ch;
public $numberOGRN;
public function __construct($print = false) {
$headers = array (
"accept:application/json, text/javascript, */*; q=0.01",
"accept-language:ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7",
"cache-control:no-cache",
"content-type:application/x-www-form-urlencoded",
"pragma:no-cache",
"sec-fetch-mode:cors",
"sec-fetch-site:same-origin",
"x-requested-with:XMLHttpRequest"
);
$body = "mode=quick&page=1&query=1192225018655&pageSize=10&sortField=NAME_EX&sort=ASC";
$this->ch = curl_init();
if (!$print) {
curl_setopt($this->ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($this->ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36');
curl_setopt($this->ch, CURLOPT_REFERER, "https://ofd.nalog.ru/index.html#pnlSearchResult");
curl_setopt($this->ch, CURLOPT_POST, true);
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);
}
}
public function set($name, $value) {
curl_setopt($this->ch, $name, $value);
return $this;
}
public function exec($url_pars) {
curl_setopt($this->ch, CURLOPT_URL, $url_pars);
return curl_exec($this->ch);
}
public function __destruct() {
curl_close($this->ch);
}
}
curl_setopt($this->ch, CURLOPT_POST, true);
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $body);
object(phpQueryObject)[11]
public 'documentID' => string '8403550de320e4fa959f4a031b14e495' (length=32)
public 'document' =>
object(DOMDocument)[8]
public 'doctype' => string '(object value omitted)' (length=22)
public 'implementation' => string '(object value omitted)' (length=22)
public 'documentElement' => string '(object value omitted)' (length=22)
public 'actualEncoding' => string 'UTF-8' (length=5)
public 'encoding' => string 'UTF-8' (length=5)
public 'xmlEncoding' => string 'UTF-8' (length=5)
public 'standalone' => boolean true
public 'xmlStandalone' => boolean true
public 'version' => null
public 'xmlVersion' => null
public 'strictErrorChecking' => boolean true
public 'documentURI' => null
public 'config' => null
public 'formatOutput' => boolean true
public 'validateOnParse' => boolean false
public 'resolveExternals' => boolean false
public 'preserveWhiteSpace' => boolean true
public 'recover' => boolean false
public 'substituteEntities' => boolean false
public 'nodeName' => string '#document' (length=9)
public 'nodeValue' => null
public 'nodeType' => int 13
public 'parentNode' => null
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => null
public 'nextSibling' => null
public 'attributes' => null
public 'ownerDocument' => null
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => null
public 'baseURI' => null
public 'textContent' => string '1' (length=1)
public 'charset' => string 'utf-8' (length=5)
public 'documentWrapper' =>
object(DOMDocumentWrapper)[7]
public 'document' =>
object(DOMDocument)[8]
public 'doctype' => string '(object value omitted)' (length=22)
public 'implementation' => string '(object value omitted)' (length=22)
public 'documentElement' => string '(object value omitted)' (length=22)
public 'actualEncoding' => string 'UTF-8' (length=5)
public 'encoding' => string 'UTF-8' (length=5)
public 'xmlEncoding' => string 'UTF-8' (length=5)
public 'standalone' => boolean true
public 'xmlStandalone' => boolean true
public 'version' => null
public 'xmlVersion' => null
public 'strictErrorChecking' => boolean true
public 'documentURI' => null
public 'config' => null
public 'formatOutput' => boolean true
public 'validateOnParse' => boolean false
public 'resolveExternals' => boolean false
public 'preserveWhiteSpace' => boolean true
public 'recover' => boolean false
public 'substituteEntities' => boolean false
public 'nodeName' => string '#document' (length=9)
public 'nodeValue' => null
public 'nodeType' => int 13
public 'parentNode' => null
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => null
public 'nextSibling' => null
public 'attributes' => null
public 'ownerDocument' => null
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => null
public 'baseURI' => null
public 'textContent' => string '1' (length=1)
public 'id' => string '8403550de320e4fa959f4a031b14e495' (length=32)
public 'contentType' => string 'text/html' (length=9)
public 'xpath' =>
object(DOMXPath)[9]
public 'document' => string '(object value omitted)' (length=22)
public 'uuid' => int 0
public 'data' =>
array (size=0)
empty
public 'dataNodes' =>
array (size=0)
empty
public 'events' =>
array (size=0)
empty
public 'eventsNodes' =>
array (size=0)
empty
public 'eventsGlobal' =>
array (size=0)
empty
public 'frames' =>
array (size=0)
empty
public 'root' =>
object(DOMElement)[10]
public 'tagName' => string 'body' (length=4)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'body' (length=4)
public 'nodeValue' => string '1' (length=1)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => null
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'body' (length=4)
public 'baseURI' => null
public 'textContent' => string '1' (length=1)
public 'isDocumentFragment' => boolean true
public 'isXML' => boolean false
public 'isXHTML' => boolean false
public 'isHTML' => boolean true
public 'charset' => string 'utf-8' (length=5)
public 'xpath' =>
object(DOMXPath)[9]
public 'document' => string '(object value omitted)' (length=22)
public 'elements' =>
array (size=1)
0 =>
object(DOMElement)[10]
public 'tagName' => string 'body' (length=4)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'body' (length=4)
public 'nodeValue' => string '1' (length=1)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => null
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'body' (length=4)
public 'baseURI' => null
public 'textContent' => string '1' (length=1)
protected 'elementsBackup' =>
array (size=1)
0 =>
object(DOMElement)[10]
public 'tagName' => string 'body' (length=4)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'body' (length=4)
public 'nodeValue' => string '1' (length=1)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => null
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'body' (length=4)
public 'baseURI' => null
public 'textContent' => string '1' (length=1)
protected 'previous' => null
protected 'root' =>
object(DOMElement)[10]
public 'tagName' => string 'body' (length=4)
public 'schemaTypeInfo' => null
public 'nodeName' => string 'body' (length=4)
public 'nodeValue' => string '1' (length=1)
public 'nodeType' => int 1
public 'parentNode' => string '(object value omitted)' (length=22)
public 'childNodes' => string '(object value omitted)' (length=22)
public 'firstChild' => string '(object value omitted)' (length=22)
public 'lastChild' => string '(object value omitted)' (length=22)
public 'previousSibling' => string '(object value omitted)' (length=22)
public 'nextSibling' => null
public 'attributes' => string '(object value omitted)' (length=22)
public 'ownerDocument' => string '(object value omitted)' (length=22)
public 'namespaceURI' => null
public 'prefix' => string '' (length=0)
public 'localName' => string 'body' (length=4)
public 'baseURI' => null
public 'textContent' => string '1' (length=1)
public 'documentFragment' => boolean true
protected 'elementsInterator' =>
array (size=0)
empty
protected 'valid' => boolean false
protected 'current' => null
Меню
Главная
О реестре
Поиск
Статистика
Вопросы и ответы
Разработчикам
Вход
Федеральная Налоговая Служба
Единый реестр субъектов малого и среднего предпринимательства
Введите ИНН или ОГРН или ОГРНИП или наименование организации или ФИО ИП
Найти
Расширенный поиск
Результаты поиска
Найдено записей: 0 (за 0 секунд)
Внимание!
Выборка ограничена первыми 0 записями. Пожалуйста, уточните параметры поиска.
Чтобы просмотреть полную выборку, выгрузите результаты поиска в Excel, нажав кнопку "Экспорт в Excel".
Вы искали:
Изменить параметры поиска
Уважаемый пользователь!
По заданным параметрам не найдено сведений в едином реестре субъектов малого и среднего предпринимательства.
Попробуйте изменить параметры поиска.
Экспорт в Excel
Наименование субъекта Категория Регион Дата вкл. в реестр
Субъектов: 0 Работников: 0
Сумма среднесписочной численности работников, занятых у субъектов малого и среднего предпринимательства (юридических лиц и индивидуальных предпринимателей, привлекавших в году, предшествующем году формирования реестра, наемных работников), за исключением упомянутых в части 3 статьи 4 Федерального закона от 24 июля 2007 г. № 209-ФЗ «О развитии малого и среднего предпринимательства в Российской Федерации» вновь созданных юридических лиц (вновь зарегистрированных индивидуальных предпринимателей).
Внимание! В указанную сумму среднесписочной численности работников не включены индивидуальные предприниматели, не привлекавшие работников.
Продукции: 0 Выберите виды продукции из справочника
Все
Микро
Малые
Средние
Все
Вновь созданные
Все
ИП
ЮЛ
По состоянию на:
Возврат к карте России
Всего
ЮЛ Микро
ЮЛ Малое
ЮЛ Среднее
ИП Микро
ИП Малое
ИП Среднее
Экспорт в Excel
Всего Юридические лица Индивидуальные предприниматели
Микро Малое Среднее Микро Малое Среднее
Уважаемый пользователь!
По заданным параметрам не найдено сведений в едином реестре субъектов малого и среднего предпринимательства.
Техническая поддержка
© 2005-2019 ФНС России
Версия 1.32.4
object(ParsNalog)[6]
private 'url_pars' => null
private 'ch' => resource(38, curl)
public 'numberOGRN' => null
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://ofd.nalog.ru/search-proc.json');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "mode=quick&page=&query=1192225018655&pageSize=10&sortField=NAME_EX&sort=ASC");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Sec-Fetch-Mode: cors';
$headers[] = 'Sec-Fetch-Site: same-origin';
$headers[] = 'Origin: https://ofd.nalog.ru';
$headers[] = 'Accept-Encoding: gzip, deflate, br';
$headers[] = 'Accept-Language: ru,en;q=0.9,ru-RU;q=0.8,en-US;q=0.7,lb;q=0.6,da;q=0.5';
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36';
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
$headers[] = 'Accept: application/json, text/javascript, */*; q=0.01';
$headers[] = 'Referer: https://ofd.nalog.ru/index.html';
$headers[] = 'X-Requested-With: XMLHttpRequest';
$headers[] = 'Cookie: _ym_uid=1567677672116808364; _ym_d=1567677672; _ym_isad=1; _ym_visorc_23729197=b; JSESSIONID=733005453A0E84B9A07FE39E19D098BC';
$headers[] = 'Connection: keep-alive';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://ofd.nalog.ru/search-proc.json');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "mode=quick&page=&query=1192225018655&pageSize=10&sortField=NAME_EX&sort=ASC");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Sec-Fetch-Mode: cors';
$headers[] = 'Sec-Fetch-Site: same-origin';
$headers[] = 'Origin: https://ofd.nalog.ru';
$headers[] = 'Accept-Encoding: gzip, deflate, br';
$headers[] = 'Accept-Language: ru,en;q=0.9,ru-RU;q=0.8,en-US;q=0.7,lb;q=0.6,da;q=0.5';
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36';
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
$headers[] = 'Accept: application/json, text/javascript, */*; q=0.01';
$headers[] = 'Referer: https://ofd.nalog.ru/index.html';
$headers[] = 'X-Requested-With: XMLHttpRequest';
$headers[] = 'Cookie: _ym_uid=1567677672116808364; _ym_d=1567677672; _ym_isad=1; _ym_visorc_23729197=b; JSESSIONID=733005453A0E84B9A07FE39E19D098BC';
$headers[] = 'Connection: keep-alive';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
echo 'raw:' . $result . '<br><br>';
echo 'decoded:';
echo '<pre>';
print_r( json_decode($result) );
echo '</pre>';
raw:{"pageCount":1,"dtQueryEnd":"06.09.2019 12:45:40","page":1,"pageSize":10,"data":[{"ogrn":"1192225018655","inn":"2222876699","isnew":1,"category":1,"regioncode":"22","dtregistry":"10.06.2019 00:00:00","nptype":"UL","okved1":"46.12.3","okved1name":"Деятельность агентов по оптовой торговле промышленными и техническими химическими веществами, удобрениями и агрохимикатами","citytype":"ГОРОД","cityname":"БАРНАУЛ","name_ex":"ОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ \"АГРОПРОМ\"","has_licenses":0,"has_contracts":0,"is_hitech":0,"is_partnership":0,"cnt":1,"token":"165829B539DC3C77CF61178C2A30D31063C0484A273F1A9E46AE13A56AB5F92CD54703FB92EAED7074657D9AA1B169E4"}],"dtQueryBegin":"06.09.2019 12:45:40","queryCount":true,"rowCount":1,"rowLimit":0,"queryTime":2}
decoded:
stdClass Object
(
[pageCount] => 1
[dtQueryEnd] => 06.09.2019 12:45:40
[page] => 1
[pageSize] => 10
[data] => Array
(
[0] => stdClass Object
(
[ogrn] => 1192225018655
[inn] => 2222876699
[isnew] => 1
[category] => 1
[regioncode] => 22
[dtregistry] => 10.06.2019 00:00:00
[nptype] => UL
[okved1] => 46.12.3
[okved1name] => Деятельность агентов по оптовой торговле промышленными и техническими химическими веществами, удобрениями и агрохимикатами
[citytype] => ГОРОД
[cityname] => БАРНАУЛ
[name_ex] => ОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ "АГРОПРОМ"
[has_licenses] => 0
[has_contracts] => 0
[is_hitech] => 0
[is_partnership] => 0
[cnt] => 1
[token] => 165829B539DC3C77CF61178C2A30D31063C0484A273F1A9E46AE13A56AB5F92CD54703FB92EAED7074657D9AA1B169E4
)
)
[dtQueryBegin] => 06.09.2019 12:45:40
[queryCount] => 1
[rowCount] => 1
[rowLimit] => 0
[queryTime] => 2
)