note 124899 rejected from book.curl by cmb
| From: | cmb@php.net | Date: | Sat, 11 Apr 2020 10:45:23 +0000 |
| Subject: | note 124899 rejected from book.curl by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-214441@lists.php.net to get a copy of this message | ||
Note Submitter: yaroslav at oleksiienko dot pp dot ua
----
OMG! Someone handle the issue with CURL double requests?
The code form an example of curl_exec that executes simple get request, send it twice to my simple
script
<?php
echo json_encode(["error" => 0]);
file_put_contents(__DIR__ .
'/log.txt',print_r(getallheaders(),true)."\n\n",FILE_APPEND);
?>
The file "log.txt" shows multiple requests!
```
Array
(
[Host] => domain.com
[X-Forwarded-For] => xxx.xxx.xxx.xxx
[Connection] => close
[Accept] => */*
)
Array
(
[Host] => domain.com
[X-Forwarded-For] => xxx.xxx.xxx.xxx
[Connection] => close
[Accept] => */*
)
```
How to send only one request????? I broke my head off!!! No answers are on internet!