Previously, this code was performed, now it is necessary to translate it to CURL to be executed, do you expect how to rewrite the code correctly?
Answer 1, Authority 100%
You only need to read CURL documentation, tyk
Answer 2
Do not post keys like access-token in sharing;)
must be approximately so (did not check):
$ parameters = [
'Access-token' = & gt; 'xxx',
'Format' = & gt; 'xlsx',
'gzip' = & gt; True.
];
$ url = 'https://webmim.svrauto.ru/api/v1/catalog/unlaad?' . http_build_query ($ parameters);
$ FP = Fopen ($ Path, 'W');
$ ch = curl_init ($ URL);
curl_setopt ($ ch, curlopt_encoding, 'gzip');
curl_setopt ($ ch, curlopt_file, $ Fp);
$ Data = CURL_EXEC ($ CH);
CURL_CLOSE ($ CH);
FClose ($ FP);