Information about IP 
Author Message
 Information about IP

hello, how can I get information about IP-address using php?

I have a list of IP, e.g. 217.74.47.3, 212.111.90.201, ....
I need to get information, such as
"inetnum:      217.74.47.0 - 217.74.47.255
netname:      IBS
descr:        IBS Ltd Corporate Nerwork
country:      RU
..........
"

help, please.

------------------------
Dina



Mon, 27 Jun 2005 19:37:51 GMT  
 Information about IP

Quote:

> hello, how can I get information about IP-address using php?

Well, you'd normally do it by doing a whois lookup on the IP address at
whois.ripe.net, under linux:


So, start with trying to find a whois class (or code it yourself, not too
difficult if you know socket programming).

Cheers,

--
Andy Jeffries
Linux/PHP Programmer
http://www.andyjeffries.co.uk/

- Windows Crash HOWTO: compile the code below in VC++ and run it!
main (){for(;;){printf("Hung up\t\b\b\b\b\b\b");}}



Mon, 27 Jun 2005 22:13:00 GMT  
 Information about IP


Quote:

> > hello, how can I get information about IP-address using php?

> Well, you'd normally do it by doing a whois lookup on the IP address at
> whois.ripe.net, under linux:


> So, start with trying to find a whois class (or code it yourself, not too
> difficult if you know socket programming).

> Cheers,

$sock = fsockopen("whois.networksolutions.com", 43);

if ($sock)
{
    fputs($sock,"4o3.net\r\n");
    while(!feof($sock))
        $result .= fgets($sock,128);

    fclose($sock);

Quote:
}

else
{
    $result = "The server could not be reached";

Quote:
}

That is just a simple whois script, the whois data is stored in $result and
will need to be formatted with reqular expressions etc, or if you just want
basic whois information just output it in <pre> tags

(This post is for the benifit of the OP, Im guessing Andy Jeffries already
knows how to do this =P)

Ian



Mon, 27 Jun 2005 22:35:00 GMT  
 Information about IP

Quote:

> (This post is for the benifit of the OP, Im guessing Andy Jeffries already
> knows how to do this =P)

:-)

--
Andy Jeffries
Linux/PHP Programmer
http://www.andyjeffries.co.uk/

- Windows Crash HOWTO: compile the code below in VC++ and run it!
main (){for(;;){printf("Hung up\t\b\b\b\b\b\b");}}



Mon, 27 Jun 2005 23:12:23 GMT  
 Information about IP


Quote:
> hello, how can I get information about IP-address using php?

> I have a list of IP, e.g. 217.74.47.3, 212.111.90.201, ....
> I need to get information, such as
> "inetnum:      217.74.47.0 - 217.74.47.255
> netname:      IBS
> descr:        IBS Ltd Corporate Nerwork
> country:      RU
> ..........
> "

> help, please.

Look into the "IP Whois" functionality of Network Query Tool,
<http://shat.net/php/nqt/>. Among other things, NQT will take an IP
address and attempt to WHOIS it at ARIN, and if it's not controlled by
ARIN, it will fallback to a few common servers such as APNIC, RIPE,
JPNIC, BRNIC, etc.

HTH

--

--------------------------|--------------------------------------------------
<http://www.phplabs.com/> | PHP scripts and thousands of webmaster resources!



Thu, 30 Jun 2005 20:30:48 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Getting TCP/IP Information

2. ActiveX IP*Works (need information)

3. TCP/IP Packet Information, using tcl

4. ip vers nom et nom vers ip

5. IP v6 instead of IP v4??

6. Anyway to get the server ip address not the browser ip address

7. Req: any information about retrieving register information of CPU

8. does anyone have an example of a c++ TCP/IP client that works with labview TCP?IP server ??

9. How do I use dial up (PPP) TCP/IP port on a machine which also has TCP/IP LAN

10. TCP/IP for Smalltalk V

11. IP address

12. Experiments with I.P. SHARP APL/PC

 

 
Powered by phpBB® Forum Software