I'm using the code below to submit POST fields to a secure form.
(It appears this question may have been answered in the phpbuilder archives, but the links to the archive items brings me back to the main forums page...)
$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 from the retrieved page (curlopt_url). While this is "running" my browser page is blank. I only see output when the timeout occurs. When I see output, my page displays correctly, but is followed by this text: Fatal error: Maximum execution time of 30 seconds exceeded in <filename>.
(<filename> is the full path to my php script.)
If I substitute a non-secure URL, like http://quote.yahoo.com/ the script works fine. But when I plug back my desired secure URL, it fails.
My Web hosting vendor uses PHP version 4.2.1. I can't
upgrade because it's not my server.
Any ideas on what's happening?
Thanks
$ch = curl_init();