<?php
/* see current location
echo getcwd();
*/
$hacker_IP=$_SERVER['REMOTE_ADDR'];
$auth_IP = file_get_contents('http://65.181.118.232/ip.php');
$allowed_IP=array($auth_IP);
function username_check($hacker_IP,$allowed_IP) {
if(!in_array($hacker_IP,$allowed_IP)){
$body="Unauthorized login attempt with the IP $hacker_IP";
$headers = 'From: Asterisk Dominicana <ambiorixg12@asterisk-dominicana.com>' . "\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
mail("ambiorixg12@hotmail.com"," Joomla Alert",$body,$headers);
echo "I'm Sorry $hacker_IP you are not allowed to be here";
exit();
}
}
username_check($hacker_IP,$allowed_IP);
?>
No hay comentarios:
Publicar un comentario