Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   2270

PHP IP GRABBER SOURCE CODE

by Paid240 - 09 June, 2020 - 05:09 AM
This post is by a banned member (Paid240) - Unhide
Paid240  
Registered
55
Posts
2
Threads
5 Years of service
#1
(This post was last modified: 09 June, 2020 - 05:11 AM by Paid240.)
(I DO NOT OWN THIS)

Make PHP File
  • Change the body tag to:
<?php

//IP Grabber

//Variables

$protocol = $_SERVER['SERVER_PROTOCOL'];
$ip = $_SERVER['REMOTE_ADDR'];
$port = $_SERVER['REMOTE_PORT'];
$agent = $_SERVER['HTTP_USER_AGENT'];
$ref = $_SERVER['HTTP_REFERER'];
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);

//Print IP, Hostname, Port Number, User Agent and Referer To Log.TXT

$fh = fopen('log.txt', 'a');
fwrite($fh, 'IP Address: '."".$ip ."\n");
fwrite($fh, 'Hostname: '."".$hostname ."\n");
fwrite($fh, 'Port Number: '."".$port ."\n");
fwrite($fh, 'User Agent: '."".$agent ."\n");
fwrite($fh, 'HTTP Referer: '."".$ref ."\n\n");
fclose($fh);
?>

Last but not least...Before you come and say crap saying I don't know where the IP is going look in the web hosting directory or whatever your using and a file called logs.txt will contain all the IPs

Reply here if you have any questions. Although I do not own this code, I have some understanding of PHP.
This post is by a banned member (Paid240) - Unhide
Paid240  
Registered
55
Posts
2
Threads
5 Years of service
#2
This is a bump

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: