Thread:Project:Support desk/api action=query/reply

The most obvious thing is that the first piece of code has the "Death" bit in it and the second does not. curl_errno($ch) could be returning true in both pieces but you would only see a failure in the first.