Hi i have to calculate the size of a remote url ex:http://www.ee.iitm.ernet.in/index.html i have written a php script but it returns only the size of html page it doesnot include the images size in that file could anyone help me in this regard
I have written PHP code that returns file size and other properties regarding that file and i want to know the images size in the index.html file could any one help in this regard <?php //file_info.php function date_str($timestamp) { $date_str = getdate($timestamp); $year = $date_str["year"]; $mon = $date_str["mon"]; $mday = $date_str["mday"]; $hours = $date_str["hours"]; $minutes = $date_str["minutes"]; $seconds = $date_str["seconds"]; return "$hours:$minutes:$seconds $mday/$mon/$year"; } function file_info($file) { global $WINDIR; $file_info_array["filesize"] = number_format(filesize($file)) . " bytes."; $file_info_array["DownloadTime For 56K Modem"] = number_format(filesize($file)/56) . " secs."; $file_info_array["DownloadTime For 150+ BroadBand"] = number_format(filesize($file)/150) . " secs."; $file_info_array["filectime"] = date_str(filectime($file)); $file_info_array["filemtime"] = date_str(filemtime($file)); if(!isset($WINDIR)) { $file_info_array["fileatime"] = date_str(fileatime($file)) . "lastacesstime."; $file_info_array["filegroup"] = filegroup($file); $file_info_array["fileowner"] = fileowner($file); } //$file_info_array["filetype"] = filetype($file); return $file_info_array; } $filename = "./docs"; $file_info_array = file_info($filename); echo "<center>Stats for $filename</center>"; foreach($file_info_array as $key=>$val) { echo ucfirst($key) . "=>". $val . "<br>"; } ?> thanks E.chidmbaram ________________________________________________________________________ For Stock Quotes, Finance News, Insurance, Tax Planners, Mutual Funds... Visit http://in.finance.yahoo.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]