note 24350 rejected from function.curl-exec by jmcastagnetto

From: Date: Tue, 13 Aug 2002 23:17:06 +0000
Subject: note 24350 rejected from function.curl-exec by jmcastagnetto
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-34970@lists.php.net to get a copy of this message
I'm using the string capture technique mentioned earlier: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://www.site.com/app.cfm"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_REFERER, "http://www.xyz.com"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "x1=abc&x2=123"); ob_start(); curl_exec ($ch); curl_close ($ch); $htmlstring = ob_get_contents(); ob_end_clean(); The problem is, my curl_exec statement is timing out. Yet when I look at VIEW SOURCE of the page that's flushed when the error occurs, all the HTML is there that I want, including the closing </html> tag, then followed by this error: Fatal error: Maximum execution time of 30 seconds exceeded in <filename>. If I substitute a safe URL, like http://quote.yahoo.com/ the script works fine. But when I plug back my desired URL, it fails. Also, my URL is a secure SSL page -- I haven't set any special curl_setopt() for SSL. Any ideas on what's happening? Thanks

« previous php.notes (#34970) next »