I assume you want the size of a remote file. The following PHP code should do the trick:
You first need to obtain the URL to the file which, in relation to MediaFire and other file sharing websites, would need extra code to obtain after satisfying the free user waiting period.