Get the file size dynamically for link info

Hi I like to mark up my Word and PDF links with text and icons.

The website I am working on is for admin users who probably won’t add classes so I have added the PDF/DOC classes dynamically with Jquery based on file type. I would really like to do something similar with file size to generate it dynamically - anyone know how to do this?

If I could PING a file with PHP or something when the page loads and write the file size dynamically that would be great.

Thanks
Steven

http://www.php.net/manual/en/function.filesize.php ?