$desc = "Enter the requested figures and you can estimate the cost of running a particular Google Adwords campaign.";
$title = "Google Adsense Calculator";
include("header.php");
?>
if(@$_REQUEST['imp'] && @$_REQUEST['prate'] && @$_REQUEST['cost'] && checkImage())
{
$_REQUEST['imp'] = str_replace(",",".",$_REQUEST['imp']);
$_REQUEST['prate'] = str_replace(",",".",$_REQUEST['prate']);
$_REQUEST['cost'] = str_replace(",",".",$_REQUEST['cost']);
$dayc = round(floatval($_REQUEST['imp']) * floatval($_REQUEST['prate']) / 100);
$monthc = 30*$dayc;
$yearc = 365*$dayc;
$day = $dayc * floatval($_REQUEST['cost']);
$month = $day*30;
$year = $day*365 + 0.25 * $dayc * floatval($_REQUEST['cost']);
echo <<
|
Amount Earned |
| Daily Earnings |
$$day |
| Monthly Earnings |
$$month |
| Yearly Earnings |
$$year |
|
Amount of Clicks |
| Daily Clicks |
$dayc |
| Monthly Clicks |
$monthc |
| Yearly Clicks |
$yearc |
EOF;
}
?>