Socket_read problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jacek

    Socket_read problem

    I have problem with socket_read function.
    Script connect to telnet and read about hundred lines.
    Example:
    $out = socket_read($so cket,4096)<------"length =4096"
    This read only 90 line - why? (change lenght to 65535 and nothing....)


    Jacek
  • Jedi121

    #2
    Re: Socket_read problem

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

    From the official doc on

    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...


    Comment

    Working...