09-21-2007, 11:51 PM
|
#3 (permalink)
|
|
The Visitor
Join Date: Sep 2007
Posts: 2
Thanks: 0
|
:)
Dear tht I think u don't got my point I actually wanna the size of file for example 'exaple.rar' file is of size 2mb... I want help in code so that when I enter url for instance imagine 'www.exmpl.com/as/example.rar' in a text box then after clicking submit button it return the size of the 'example.rar' or generate error message if url is not valid...
I think HTTP Header help out in this problem but I don't know how to Print it....
PHP Code:
$szFile = file_get_contents('http://www.google.co.uk/intl/en_uk/images/logo.gif');
echo round(strlen($szFile) / 1024, 2) . 'KB';
Dear I think this code help to get the size of url string not the targeted gif file. I wanna the size of gif file...
|
|
|
|