reading filesize on remote server

From: Date: Thu, 05 Aug 2004 12:14:39 +0000
Subject: reading filesize on remote server
Groups: php.general 
Request: Send a blank email to php-general+get-192836@lists.php.net to get a copy of this message
Im having a problem reading filesizes on a remote server, hven only having the domainname, and not the exact filename. (i want to use it to read the filesize and thereby the downloadtime of the html-file, and it all schould happen automaticly when someone writes the domainname at my webpage) ) i've tried this: $filename = 'http://www.example.com'; $fp = fopen($filename, "r"); $size = filesize($filename); echo $size; fclose($fp); but it only returns this error: Warning: filesize(): Stat failed for http://www.example.com (errno=2 - No such file or directory) WHAT AM I DOING WRONG??? Tobias, Denmark

« previous php.general (#192836) next »