Fatal error: Maximum execution time of 30 seconds exceeded in /home/wrjou27/public_html/create3.php on line 12 so why might it do this?
well giving us the source would help! Think of anywhere the code could bomb (go into an infinate loop). Something that could be waiting on an operation (such as a socket).
LOL. ya, sorry, the source can be helpfull cant it? PHP: <?php $fp = fsockopen("www.wrjournal.net", 2083, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET /frontend/Xskin/mail/doaddpop.html?email=AAtest1&domain=wrjournal.net&password=****y"a=2 HTTP/1.0\r\n"; $out .= "Authorization: Basic d364bitpassDE=\r\n"; $out .= "Connection: Close\r\n\r\n"; fputs($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?> How could I forget the source?
yup its hanging in the while loop whilst waiting for a reply, the fgets function is whats known as a blocking function. That is execution hangs there until something is recived, and then its waiting 30 seconds because thats the timeout specified in the fsockopen. First off try turning that down to 10 or somthing, as when the timeout error occours you will loose all other info on your page. Also if your wanting to just include that page, why not include it? from http://uk.php.net/manual/en/function.include.php Code: // Works. include 'http://www.example.com/file.php?foo=1&bar=2';
Ya, its going to be included and I think I found the err. On line: PHP: echo fgets($fp, 128); I had PHP: //echo fgets($fp, 128); figures...