Grab IP address with PHP.

General Talk about Paltalk.

Moderator: amirca

Forum rules
This Forum does not support , nor Promote the use of any cracked versions of Paltalk. We support versions downloaded from http://www.paltalk.com

Grab IP address with PHP.

Postby djibtech » Fri Mar 15, 2013 5:40 pm

Today I’ll be showing you how to grab somebodies IP address when they visit a page.
The variable to use is $_SERVER['REMOTE_ADDR'] - It’s that simple. You can use it
for just about anything, here are a few examples.
Printing the Users IP Address:
<?php
print ($_SERVER['REMOTE_ADDR'], "I'm Watching You!");
?>
Printing it to a File:
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$handle = fopen('ipaddresses.txt'', 'a+);
fwrite($handle, $ip); fwrite($handle, "\n");
fclose($handle);
?>

All you have to do, is to make a text file and insert any of these codes or one of your
own and save it as anythingyouwant.php
Then upload it to your website and it'll do the trick
The Possibilities for what you can use this to are endless.
Good luck 1uhoh
User avatar
djibtech
Dutchplace Crown 1
Dutchplace Crown 1
 
Posts: 2
Joined: Thu Mar 25, 2010 10:17 am

Re: Grab IP address with PHP.

Postby ChiNa » Sat Mar 16, 2013 2:01 am

Nice one, Used it a lot when I had my own USER INFO on my website, very effective.... But not everyone knows how to create a PHP file or knows even to have a website with FTP etcs!

Here is also another one I posted long ago: viewtopic.php?f=14&t=2722
User avatar
ChiNa
Dutchplace_Admin
Dutchplace_Admin
 
Posts: 314
Joined: Sun Apr 03, 2011 6:34 pm
Location: Mars


Return to Paltalk General

Who is online

Users browsing this forum: No registered users and 1 guest

cron