Location: PHPKode > scripts > My Hosting Requirements > myhore.php
<?php
class myhore{
function calc_myhore($Visitors,$PageViews,$PageSize)
	{
	$tmbpd = number_format(($Visitors * $PageViews * $PageSize )/ 1048576, 2, '.', '');
	$tgbpm = number_format(($Visitors * $PageViews * $PageSize * 30.41) / 1073741824, 2, '.', '');
	$tmbpv = number_format(($PageViews * $PageSize )/ 1048576, 2, '.', '');
	$min_br = number_format(($Visitors * $PageViews * $PageSize * 8 )/ (86400 * 1000), 2, '.', '');
	$max_br = number_format(($Visitors * $PageViews * $PageSize * 8 * 3 )/ (86400 * 1000), 2, '.', '');

echo "<center><table border='0' cellspacing='2' cellpadding='2'  >
<tr><td rowspan=3 valign=top>Estimated Traffic</td><td><input type='text' name='TrafficDay' size='20' value=".$tmbpd." disabled > Megabyte per day</td></tr>
<tr><td><input type='text' name='TrafficMonth' size='20' value=".$tgbpm." disabled > Gigabyte per month</td></tr>
<tr><td><input type='text' name='TrafficVisitor' size='20' value=".$tmbpv." disabled > Megabyte per visitor</td></tr>
<tr><td>Minimum bandwidth Required</td><td><input type='text' name='Bandwidth' size='20' value=".$min_br." disabled > Kilobit per second</td></tr>
<tr><td>Maximum bandwidth Required</font></td><td><input type='text' name='BandwidthMax' size='20' value=".$max_br." disabled > Kilobit per second</td></tr>
</table><br/>

Traffic in megabytes per day = VisitorsPerDay * PageViews * PageSize / 1048576 <br/>
Traffic in gigabytes per month = VisitorsPerDay * PageViews * PageSize * 30.41 / 1073741824 <br/>
Traffic in megabytes per visitor = PagesPerVisitor * PageSize / 1048576 <br/>
Minimum bandwidth needed = VisitorsPerDay * PagesPerVisitor * PageSize * 8 / (86400 * 1000) <br/>
Maximum bandwidth needed = VisitorsPerDay * PagesPerVisitor * PageSize * 8 * 3 / (86400 * 1000)<br/></center> <br/><h2/>Other calculates?</h2>";
	return;
	}
}
?>
Return current item: My Hosting Requirements