Fetching https with curl

    Date: 08/31/05 (PHP Community)    Keywords: xml, web

    For the past couple of weeks I've used the following code to send post requests via https and receive an XML response:

    		$ch = curl_init();
    		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    		curl_setopt($ch, CURLOPT_URL, $url);
    		curl_setopt($ch, CURLOPT_POST, 1);
    		curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
    		ob_start();
    		$responseXML = curl_exec($ch);
    		ob_end_clean();
    		curl_close($ch);


    This worked great as recently as this afternoon. Then, suddenly, it completely stopped working. At 4:00 it'd post to http or https, and by 5:30 I couldn't get curl to do anything for any https URL. The strangest thing is that I hadn't touched this code at all in the meantime--it'd been working so well that I hadn't needed to.

    Unless my webhost did something funky this evening--and I'm still waiting to hear from them about it--I have to assume I caused this, but I have no idea what I did. What could have happened?

    Source: http://www.livejournal.com/community/php/340672.html

« Stuck with XML || Getting Windows user name »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home