Created
April 1, 2019 15:14
-
-
Save rk4bir/8133b511078e8cbfc18755175fd58ff5 to your computer and use it in GitHub Desktop.
IP tracing with PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<?php | |
error_reporting(0); | |
date_default_timezone_set("Asia/Dhaka"); | |
$ip = $_SERVER['REMOTE_ADDR']; | |
$br = $_SERVER['HTTP_USER_AGENT']; | |
$info = "IP => $ip ----- Browser => $br"; | |
$fileName = "ip_" . date("d.m.Y") . '_' . date('H.i.s') . '.txt'; | |
$file = fopen($fileName, 'wb'); | |
fwrite($file, $info); | |
fclose($file); | |
header("Location: http://www.aljazeera.com/"); | |
exit(); | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment