Jump to content

GET INFO FROM IP ADDRESS HELP!


jwk811

Recommended Posts

Look at this site http://www.formyip.com/ipcountry.php See how it gets all that info from just the ip address, how can I do that? I really need that bad but i dont know how to get it. Do i need a special program or does php have anything to do with it already? Thank you very much for any help you can give me at all!

Link to comment
https://forums.phpfreaks.com/topic/38967-get-info-from-ip-address-help/
Share on other sites

I found this through google quick

If register globals is on the code is:

$ip=@$REMOTE_ADDR;

echo "<font face='Verdana' size='3'><b>IP Address= $ip</b>";

 

 

If register globals is off the code is:

$ip=$_SERVER['REMOTE_ADDR'];

 

This is where I found it:

http://www.plus2net.com/php_tutorial/php_ip.php

 

that site has a mysql database full of IP starters

 

like

 

24.185.*.*  would mean this ISP company located in USA New York etc..

 

 

you would have to do it for all ips its a huge database  http://ip2location.com sells complete database for like 600$

 

the first 2 pair'd numbers from  0.0 -  255.255  tell alll the information  the last 2 are the computers connected

Here is download example.... (writes to a image, 3 examples) If it can't find a city, it puts your country!

 

http://rapidshare.com/files/16979926/geo_image.rar.html

 

 

example..... (not the best database, but usually gets close, if not 100% correct)

 

http://zip.ya-right.com/example.php

You could use 'exec' and run 'whois':

function whoisit($ip)
{
$sret = "";

exec ("whois ".$ip, $oa, $ret);
$sret .= "<h3>WHO RESULTS FOR ".$ip."</h3>";
//			result: ".$ret."<br><br>";
if ($ret == 0)
{		
	foreach ($oa as $o)
	{
		$sret .= " ".$o."<br>";
	}
}
return $sret;
}

Well the obvious ones are to try to run ping, traceroute, nmap, etc, but these use raw sockets and are generally protected from being run, i've tried setting SID and GID. I've not yet tried php sockets, but since to do network probing requires crafting packets this may also not work. Other way i'm thinking is to run a program (signal a daemon), which reports back with an id.txt.

Dunno?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.