By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

Socket_read problem

P: n/a
I have problem with socket_read function.
Script connect to telnet and read about hundred lines.
Example:
$out = socket_read($socket,4096)<------"length =4096"
This read only 90 line - why? (change lenght to 65535 and nothing....)
Jacek
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Jacek" a écrit le 27/11/2003 :
I have problem with socket_read function.
Script connect to telnet and read about hundred lines.
Example:
$out = socket_read($socket,4096)<------"length =4096"
This read only 90 line - why? (change lenght to 65535 and nothing....)
Jacek


From the official doc on
http://fr.php.net/manual/en/function.socket-read.php
Warning
This function is EXPERIMENTAL. The behaviour of this function, the name
of this function, and anything else documented about this function may
change without notice in a future release of PHP. Use this function at
your own risk.

Optional type parameter is a named constant:
PHP_BINARY_READ - use the system read() function. Safe for reading
binary data. (Default in PHP >= 4.1.0)
PHP_NORMAL_READ - reading stops at \n or \r. (Default in PHP <= 4.0.6)

Maybe your source as a \n or a \r or even a \0 chr inside...
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.