FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Tracing an IP with PHP





ninjakannon
I know that you can get the IP in PHP using:
Code:
$_SERVER['REMOTE_ADDR']

But I want to go a bit further and do what this page does. Type in an IP address, you'll have to find one or use your own and click submit query. The page then tells you - if it can - the whole address, for example you type in 123.321.67.76 and it gives you 123.321.67.76.something.else3805.com.

So how do you do that?

My explanation isn't too good here, so have a look for yourself to understand what's going on.
ninjakannon
I've already managed to find out, you just do this:

Code:
<?php
$hostName = gethostbyaddr($_SERVER['REMOTE_ADDR']);
 
echo $hostName;
?>
Related topics
Visitor ip PHP (E107)
PHP IP Ban
php script sows Ip
ip looking
Ip Banning Using Php
users online, using php and text file
php counter
IP Address HTML CODE
PHP Tutorial: Basic Shoutbox w/ MySQL
poll met ip check
Tracing Ip adresses
Hostng off your computer.
PHP IP tracking script ?
Show People's IP In a Pic
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.