Home php Translate file receipt on CURL

Translate file receipt on CURL

Author

Date

Category

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);

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions