Hi, folks...
I am getting some files via HTTP using the CURL library.

I check if the transfer of the files have been successful using the HTTP_CODE, which if all goes well will give "200". However, a few times I get a "0" as response, and the transfer fails...

What does "0" means? It is not an accepted HTTP code for connection failed, so I am getting crazy about what it really means, what is the cause, and how could I prevent it from happening... (or should I make a loop till I get the files right???)...

Thank you very much...

    It's false (which looks like 0 when cast to an integer), and means that the cURL operation failed for some reason. See what [man]curl_error[/man] says about it. See also some of the user notes on the [man]curl_exec[/man] page.

      Ok, thanks a lot...

      I thought that 0 was part of the http code, not a failure of curl. I will activate the error function, though surely I will make a loop. I have reproduced the error when putting a non-existing domain server for example... I had assumed that it would always return an http code, but of course if the domain does not exist, for example, that is a little difficult... thank you very much!!!!!

        Write a Reply...