Re: [PHP] Pointer Size

2002-05-02 Thread Miguel Cruz

On Thu, 2 May 2002, [iso-8859-4] marius petravièius wrote:
>  I'm trying to get the size of pointer.
> 
>  First I use
>$res = fsockopen( $server, $port );
>  then
> echo fgets( $handle, 1024 );
>  But  it  only  gets only one line. So I need to know the size of then
>  pointer. I tried to do it with fstat(), but it didn't work..
>  So can anybody help me to solve this problem?

What are you trying to get the size of? The result of fgets can be
measured with strlen.

In general with socket operations, the amount of incoming data is not 
fixed; new data can keep arriving. So you can just keep reading until you 
get to the end of what's currently buffered, and add that up.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Pointer Size

2002-05-02 Thread marius petravičius

hello, php-general,

 I'm trying to get the size of pointer.

 First I use
   $res = fsockopen( $server, $port );
 then
echo fgets( $handle, 1024 );
 But  it  only  gets only one line. So I need to know the size of then
 pointer. I tried to do it with fstat(), but it didn't work..
 So can anybody help me to solve this problem?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php