Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Pobieranie informacji o IP (whois), takie jak: country, person, route....
Daimos
post
Post #1





Grupa: Zarejestrowani
Postów: 1 319
Pomógł: 118
Dołączył: 26.11.2003
Skąd: Lublin

Ostrzeżenie: (0%)
-----


Kod
212.182.63.102 = w3cache.lublin.pl
inetnum:      212.182.63.0 - 212.182.63.255
netname:      PL-LUB-MAN-1
descr:        LUBMAN, Provider Local Registry
descr:        Internal Usage (backbone & servers)
country:      PL
admin-c:      AR1187-RIPE
tech-c:       AR1187-RIPE
tech-c:       AU229-RIPE
status:       ASSIGNED PA
remarks:      renumbered from 192.147.37.0
mnt-by:       PL-LUBMAN-MNT
mnt-lower:    PL-LUBMAN-MNT
source:       RIPE

person:       Andrzej Resztak
address:      ZIO UMCS
address:      Pl. Marii Curie-Sklodowskiej 1
address:      20-031 Lublin
address:      POLAND
phone:        +48 81 537 2017
fax-no:       +48 81 537 2027
e-mail:       Andrzej.Resztak@man.lublin.pl
nic-hdl:      AR1187-RIPE
mnt-by:       PL-LUBMAN-MNT
source:       RIPE

person:       Artur Urbanowicz
address:      LubMAN UMCS
address:      Pl. Marii Curie-Sklodowskiej 1
address:      20-031 Lublin
address:      Poland
phone:        +48 81 5376278
fax-no:       +48 81 5376295
e-mail:       Artur.Urbanowicz@man.lublin.pl
nic-hdl:      AU229-RIPE
source:       RIPE


route:        212.182.0.0/18
descr:        academic part of Lublin MAN, Poland
origin:       AS12324
remarks:      removed cross-nfy:    AR1187-RIPE
mnt-by:       PL-LUBMAN-MNT
source:       RIPE

no wlasnie, jak takie cos uzyskac (IMG:http://forum.php.pl/style_emoticons/default/snitch.gif) ?

Ten post edytował buffalo soldier 7.05.2005, 22:29:33
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Daimos
post
Post #2





Grupa: Zarejestrowani
Postów: 1 319
Pomógł: 118
Dołączył: 26.11.2003
Skąd: Lublin

Ostrzeżenie: (0%)
-----


szukalem juz dluuuuugo
znalazlem cos takiego:
  1. <?php
  2. class whois
  3. {
  4. var $server;
  5. var $port;
  6. var $data;
  7.  
  8. function set_server($server)
  9. {
  10. $this->server = $server;
  11. }
  12.  
  13. function set_port($port)
  14. {
  15. $this->port = $port;
  16. }
  17.  
  18. function query($adress)
  19. {
  20. $fp = fsockopen($this->server, $this->port);
  21. if (!$fp)
  22. {
  23.  $this->data = 0;
  24.  return FALSE;
  25. }
  26. else
  27. {
  28. fputs($fp, &#092;"$adressn\");
  29. $this->data = fread($fp, 16384);
  30. fclose($fp);
  31. return TRUE;
  32. }
  33. }
  34.  
  35. function get_info()
  36. {
  37. $lines = split(&#092;"n\", $this->data);
  38. while (list($key, $value) = each($lines))
  39. if (ereg(&#092;"descr: +(.*)\", $value, $match))
  40. $info .= &#092;"$match[1]n\";
  41. return $info;
  42. }
  43.  
  44. }
  45.  
  46. $whois = new whois;
  47. $whois->set_server(&#092;"whois.ripe.net\");
  48. $whois->set_port(43);
  49. if($whois->query($q))
  50. if($whois->get_info())
  51. $info = $whois->get_info();
  52. else
  53. $info = &#092;"Brak danychn\";
  54.  
  55. ?>
  56. <html>
  57.  
  58. <head></head>
  59.  
  60. <body bgcolor=white>
  61.  
  62. <br>
  63. <br>
  64.  
  65. <table align=center width=400 border=1 bordercolor=#d0d0d0>
  66. <tr bgcolor=#d0d0d0>
  67. <td>
  68. <big><?php echo $q;?></big>
  69. </td>
  70. </tr>
  71. <tr>
  72. <td>
  73. <pre><?php echo $info;?></pre>
  74. </td>
  75. </tr>
  76. </table>
  77.  
  78. </body>
  79.  
  80. </html>

ale za kazdym razem, przy kazdym ip zwraca
Kod
Brak danych
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 7.10.2025 - 13:58