Possible Duplicate:
How to detect the finish with file_put_contents() in php?
I'm making a download script in PHP. Like following:
1) $item = file_get_contents($url);
2) echo "To download: ".filesize($url)."<br>";
3) echo "Received: ".file_put_contents("Downloaded_File_Name", $item);
Downloading works fine (I receive the file) but line 2 doesn't work. I want to detect the file size while before the download.
Or is there another better way to do remote downloading?