Connect to telnet

From: Date: Sat, 17 Aug 2002 10:51:36 +0000
Subject: Connect to telnet
Groups: php.db 
Request: Send a blank email to php-db+get-21188@lists.php.net to get a copy of this message
I want connect cisco router over telnet connection a need send char CTRL-Z for update change from DB and save and exit. I do not know how Scan code or CHR() have combination from keyboard CTRL + Z. Plese help me. My code: <PRE> <% $ctrlz=???; $fp = fsockopen ($myIPadress, 23, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br>\n"; } else { fputs ($fp, "ena\npassword\nusername tomas password pass\n".CHR($ctrlz)."write\nexit\n"); while (!feof($fp)) { $text=fgets ($fp,128); echo $text; } fclose ($fp); } %> </PRE> Tomas

« previous php.db (#21188) next »