note 90913 modified in function.filesize by danbrown

From: Date: Sat, 16 May 2009 14:51:29 +0000
Subject: note 90913 modified in function.filesize by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154667@lists.php.net to get a copy of this message
Shortest solution to get filesize of a remote website <?php $content = file_get_contents("http://www.example.com"); $handle = fopen("example-com.html", "w+"); fwrite($handle, $content); fclose($handle); echo size . ': ' . filesize('example-com.html') . ' bytes'; ?> --was-- Shortest solution to get filesize of a remote website <? $content = file_get_contents("http://www.php.net"); $handle = fopen("php-net.html", "w+"); fwrite($handle, $content); fclose($handle); echo size . ': ' . filesize('php-net.html') . ' bytes'; ?> http://php.net/manual/en/function.filesize.php

« previous php.notes (#154667) next »