aelouch001 Posted December 10, 2013 Share Posted December 10, 2013 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 Link to comment https://forums.phpfreaks.com/topic/284693-php-telnet-error/ 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? Link to comment https://forums.phpfreaks.com/topic/284693-php-telnet-error/#findComment-1462015 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.