Jump to content

filesize


sugan

Recommended Posts

Hi,How to know url file size without downloading it?lets say i have the image:

[a href=\"http://localhost/easycalcualtion/images/t3.gif\" target=\"_blank\"]http://localhost/easycalcualtion/images/t3.gif[/a]

how can i know its size (kb\mb\...) without downloading the picture Regards,Sugan

Link to comment
Share on other sites

Provided you have PHP5:

<?phpecho filesize(http://localhost/easycalcualtion/images/t3.gif);?>

Or in other words, the filesize() function. It returns it in bytes. If you want it in KBs, just divide by 1024. And for MBs, devide the KBs to yet another 1024.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...