note 34551 deleted from function.fsockopen by cmb
| From: | cmb@php.net | Date: | Sun, 07 Jul 2019 07:54:29 +0000 |
| Subject: | note 34551 deleted from function.fsockopen by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211498@lists.php.net to get a copy of this message | ||
Note Submitter: sergiopaternoster at tiscali dot it
----
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