Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <img src="http://imageurlhere" alt="fox image">
- </html>
- <?php
- function getUserIP()
- {
- $client = @$_SERVER['HTTP_CLIENT_IP'];
- $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
- $remote = $_SERVER['REMOTE_ADDR'];
- if(filter_var($client, FILTER_VALIDATE_IP))
- {
- $ip = $client;
- }
- elseif(filter_var($forward, FILTER_VALIDATE_IP))
- {
- $ip = $forward;
- }
- else
- {
- $ip = $remote;
- }
- return $ip;
- }
- $ip = getUserIP();
- $fullpath = $_SERVER['REQUEST_URI'];
- $filename = basename($fullpath);
- $useragent = $_SERVER["HTTP_USER_AGENT"];
- $file = 'ips.log';
- file_put_contents($file, "_____________________________________________________________________", FILE_APPEND);
- file_put_contents($file, "\r\n", FILE_APPEND);
- file_put_contents($file, $fullpath, FILE_APPEND);
- file_put_contents($file, "\r\n", FILE_APPEND);
- file_put_contents($file, $ip, FILE_APPEND);
- file_put_contents($file, "\r\n", FILE_APPEND);
- file_put_contents($file, $useragent, FILE_APPEND);
- file_put_contents($file, "\r\n", FILE_APPEND);
- file_put_contents($file, "_____________________________________________________________________", FILE_APPEND);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment