aelouch001 Posted December 10, 2013 Share Posted December 10, 2013 (edited) Hi all we are currently getting problems loading a telnet application using PHP we are getting the following time out error whilst trying to the script? Could anyone have a look and see if they could shed some light on the issue we are having. THE CODE <?php $cfgServer = "cuckoo.ltraffic.co.uk"; //IP of your router $cfgPort = 23; //port, 22 if SSH $cfgTimeOut = 30; $usenet = fsockopen($cfgServer, $cfgPort, $errno, $errstr, $cfgTimeOut); if(!$usenet) { echo "Connection failed\n"; exit(); } else { echo "Connected\n<BR>"; fputs ($usenet, "site12\r\n"); fputs ($usenet, "wargon\r\n"); $start = NULL; $timeout = ini_get('default_socket_timeout'); while(!safe_feof($usenet, $start) && (microtime(true) - $start) < $timeout) { echo "+++ ".fgets($usenet, 4096)." +++<BR>\n"; } } function safe_feof($fp, &$start = NULL) { $start = microtime(true); return feof($fp); } ?> THE ERROR Connected +++ ++++++ Cuckoo Login: ++++++ Password: ++++++ Connected to Cuckoo: ++++++ +++Fatal error: Maximum execution time of 60 seconds exceeded inC:\Inetpub\vhosts\ltraffic.co.uk\cuckoo.ltraffic.co.uk\map\telnet.php on line 103 Edited December 10, 2013 by aelouch001 Quote Link to comment Share on other sites More sharing options...
jazzman1 Posted December 10, 2013 Share Posted December 10, 2013 60 seconds is not a short time What kind of content do you want to telnet it and write down into your local machine? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.