curl_exec not hit server
| From: | Ted Yu | Date: | Thu, 06 Aug 2009 18:33:41 +0000 |
| Subject: | curl_exec not hit server | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-296391@lists.php.net to get a copy of this message | ||
Hi,
I use the following code to call third party web service:
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_SSLVERSION, 3);
curl_setopt($ch, CURLOPT_SSLCERT, $loc);
curl_setopt($ch, CURLOPT_SSLCERTPASSWD, $password);
curl_setopt($ch, CURLOPT_HTTPHEADER, $this->_httpHeaders);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_xmlData);
$ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$xmlResponseData = curl_exec($ch);
But for a specific API, curl_exec() returns true but there was no hit on their server (as verified
by contact in that company from server log)
Can someone provide hint ?
Thanks