Answer the question
In order to leave comments, you need to log in
I get a response of 200 OK, after sending another 500, what is the reason?
I successfully send a request, I get a response of 200 OK. After that, within 1-2 minutes I can not send a request, writes an error:
5 0 0 !
Internal server error.
Please try again in a few minutes.
In 1-2 minutes I can send the request again. How to solve the problem? For requests need to be sent more often than once in 1-2 minutes. At least once every 10 seconds.
Tested on 3 different hostings and domains, the behavior is the same.
Given that if you send from one page (on one hosting) successfully, then there will be an error on another hosting. That is, a timeout is given for one general request for a parameter. Could it depend on the parameters the server accepts? Mb it blocks requests for a while from some ID (For there is our ID).
Here is the code:
<?php
$url = 'URL HERE';
$ch = curl_init($url);
$jsonData = array(
'SOMEINFO' => 'SOMEINFO',
'SOMEINFO' => 'SOMEINFO',
'SOMEINFO' => 'SOMEINFO',
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question