sad_sam19 Posted March 2, 2010 Share Posted March 2, 2010 Hi guys! Once the page is loaded from the client, i need to get their bandwidth. But i have no idea for the formula or calculations. help please :'( thanks Link to comment https://forums.phpfreaks.com/topic/193864-bandwidth-of-client/ Share on other sites More sharing options...
inversesoft123 Posted March 2, 2010 Share Posted March 2, 2010 <?php function bandwidthused($buffer) { $file_size = strlen($buffer); //store the file size in DB or file return ($buffer); } ob_start('bandwidthused'); ob_clean(); ?> not used yet but may work Link to comment https://forums.phpfreaks.com/topic/193864-bandwidth-of-client/#findComment-1020299 Share on other sites More sharing options...
sad_sam19 Posted March 2, 2010 Author Share Posted March 2, 2010 Thanks for your reply ..i saw a post from the php.net site that goes like this.. ob_start(); $StartTime=microtime(1); .. webpage data goes here .. printf("%s seconds to produce (%skb/sec)", microtime(1)-$StartTime, Round((ob_get_length()/(microtime(1)-$StartTime))/1024)); ob_end_flush(); .. is this the exact code i'm looking for? thanks Link to comment https://forums.phpfreaks.com/topic/193864-bandwidth-of-client/#findComment-1020304 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.