note 34551 modified in function.fsockopen by danbrown

From: Date: Sun, 20 Jul 2008 19:52:17 +0000
Subject: note 34551 modified in function.fsockopen by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142319@lists.php.net to get a copy of this message
If you want to connect via Telnet, it could be useful to set also the Terminal Type (some OS requires it) <?php $IAC = chr(255); /* interpret as command: */ $SB = chr(250); /* interpret as subnegotiation */ $SE = chr(240); /* end sub negotiation */ $TELOPT_TTYPE = chr(24); /* terminal type */ $TELQUAL_IS = chr(0); /* Option is... */ //sending Terminal Type fwrite($sock,$IAC.$SB.$TELOPT_TTYPE.$TELQUAL_IS.'vt100'.$IAC.$SE); ?> ciao Sergio Paternoster --was-- If you want to connect via Telnet, it could be useful to set also the Terminal Type (some OS requires it) $IAC = chr(255); /* interpret as command: */ $SB = chr(250); /* interpret as subnegotiation */ $SE = chr(240); /* end sub negotiation */ $TELOPT_TTYPE = chr(24); /* terminal type */ $TELQUAL_IS = chr(0); /* Option is... */ //sending Terminal Type fwrite($sock,$IAC.$SB.$TELOPT_TTYPE.$TELQUAL_IS.'vt100'.$IAC.$SE); ciao Sergio Paternoster http://php.net/manual/en/function.fsockopen.php

« previous php.notes (#142319) next »