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 Quote 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 Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/193864-bandwidth-of-client/#findComment-1020304 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.