problem with fread

From: Date: Tue, 07 May 2002 09:49:34 +0000
Subject: problem with fread
Groups: php.general 
Request: Send a blank email to php-general+get-96375@lists.php.net to get a copy of this message
Hy, i have a question about the fread() function. i want to read data from a webserver url, which i don't know the exact size of, i only know that it varies. i see i have to give the lentgh of a file when reading it, but for remote files i have no way to check the size. And i saw no way to tell fread it should just read until the end. ok, i could set the filesize very high,. but this seems a dirty solution. on the other hand there is the fgets() function to read data "line by line" - but my data has no linbreaks, it's only serialized php variable data that comes in one line. what's the best olution for that situation? tia, henning

« previous php.general (#96375) next »