Unable to connect to the API after live transmission

Read 7249 times
Hi,

I have programmed a script for loading the current song and band information from the API every 10 seconds. I am using cURL from PHP.

The problem is after we finish a live transmission, the script is unable to connect to the server, ending with "Time Out" or "Unable to Connect". There is no response from the server, the script hungs and never again receive a response from it.

I have tested moving the script to another server and everything works fine (after the transmission), so, why the script is unable to connect after a live transmission?

Does my script need a cURL special configuration? This is the part of the script where I make the request:

$xml_builder = '<centovacast>
                        <request class="server" method="getstatus">
                            <password>mypassword</password>
                            <username>myusername</username>
                        </request>
                    </centovacast>';

     $ch = curl_init('http://myprovider.com/api.php');
      curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
      curl_setopt($ch, CURLOPT_HEADER, 0);
      curl_setopt($ch, CURLOPT_POST, 1);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_builder);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
      curl_setopt($ch, CURLOPT_REFERER, 'http://wwww.mywebsite.com');
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      $ch_result = curl_exec($ch);
      curl_close($ch);

I really appreciate the help you can provide. Thank you!
If you tried it on another server and it worked fine, maybe there is something on the current server that is missing something or something that isnt turned on for cURL to work correctly ?

Try contacting the server administration and see if something might be missing or not installed.
CrossFire-Hosting LLC.
Co-Owner
Thank you for your response.

I've been testing another connection methods like fopen or sockets, but the server denies all the requests. After all these tests I am almost sure that our IP/host is being banned by the streaming provider because cURL is working fine (I tested it with another hosts) and fopen as well.

Thank you!  I will continue investigating.