![]() |
|
|
+ Search |
![]()
|
Dec 22nd, 2000 13:18
Ben Udall, Martin Akesson, Yvo SChaap, http://www.php.net/manual/function.fopen.php
It all depends on how you're accessing that other sever. A file on a
http server can be accessed with php, and the file size derived from
that. For example:
$fp = fopen('http://www.php.net', 'r');
$size = 0;
if ($fp) {
while (!feof($fp))
$size += strlen(fread($fp, 4096));
fclose($fp);
}
echo 'file size is ' . $size . ' bytes';
More details can be found in the php documentation for fopen()
http://www.php.net/manual/function.fopen.php