Re: Remote File system size

From: Date: Thu, 13 Sep 2001 04:13:54 +0000
Subject: Re: Remote File system size
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67137@lists.php.net to get a copy of this message
I don't think GetImageSize() has had the URL-fopen wrappers folded into it. You're simply going have to read the file (or at least part of it) and find the image size that way. Not that GetImageSize digs into the file to find width and height encoded in the file format, not the actual number of bytes in the file. That would be http://php.net/filesize *THAT* function might actually have the URL-fopen wrappers built into it... -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Boy Next Door <ekobudi@singnet.com.sg> Newsgroups: php.general To: <php-general@lists.php.net> Sent: Wednesday, September 12, 2001 5:36 AM Subject: Remote File system size I need to know the file size of remote file, but never be able to do it. One of the my example PHP Script: <?php $location = "http://www.blockm.com/admin.gif"; $fp = fopen($location,"w"); file://$fp = file_exists($location); if(!$fp) {$message = "File not found";} else {$message = "File Found"; $temp = fstat($location); $image = GetImageSize ($location); } echo "$message<br>"; echo "File Size: " . $temp[7] . "<br>"; echo "Image Size: $image[3]<br>"; fclose($fp); ?> The above script can working properly for reading local file. NB: I am doing project for Banner exchange. I want to put all the banner immage on remote Server. Regards Eko

« previous php.general (#67137) next »