Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]curl dns
piotrek4523
post 7.07.2011, 20:36:47
Post #1





Grupa: Zarejestrowani
Postów: 14
Pomógł: 0
Dołączył: 19.06.2011

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


jak mozna pobrac dns domeny za pomocą curl lub jakiejkolwiek innej funkcji w php
czy mozna dostac tą zmienna odwoujac sie bezposrednio do domeny ?
Go to the top of the page
+Quote Post
morbic
post 7.07.2011, 20:48:30
Post #2





Grupa: Zarejestrowani
Postów: 116
Pomógł: 29
Dołączył: 13.12.2010
Skąd: Warszawa

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


gethostbyname()
dns_get_record()


--------------------
"Aby zrozumieć rekurencję, musisz najpierw zrozumieć rekurencję."
Go to the top of the page
+Quote Post
piotrek4523
post 7.07.2011, 21:57:05
Post #3





Grupa: Zarejestrowani
Postów: 14
Pomógł: 0
Dołączył: 19.06.2011

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


dns_get_record() dziala, tylko mam problem jak wydobyc to co mi jest potrzebne
tz potrzebuje tylko nazwe serwerów dns dla domeny

to co zwraca mi funkcja dla onet.pl
  1. Array ( [0] => Array ( [host] => onet.pl [type] => SOA [mname] => dns1.onet.pl [rname] => dns.onet.pl [serial] => 2011070702 [refresh] => 300 [retry] => 150 [expire] => 2419200 [minimum-ttl] => 300 [class] => IN [ttl] => 145 ) [1] => Array ( [host] => onet.pl [type] => A [ip] => 213.180.146.27 [class] => IN [ttl] => 145 ) [2] => Array ( [host] => onet.pl [type] => MX [pri] => 1 [target] => kmx.poczta.onet.pl [class] => IN [ttl] => 260 ) [3] => Array ( [host] => onet.pl [type] => TXT [txt] => v=spf1 ip4:213.180.128.0/19 -all [entries] => Array ( [0] => v=spf1 ip4:213.180.128.0/19 -all ) [class] => IN [ttl] => 110 ) [4] => Array ( [host] => onet.pl [type] => TXT [txt] => ul. G.Zapolskiej 44; 30-126 Krakow, Poland [entries] => Array ( [0] => ul. G.Zapolskiej 44; 30-126 Krakow, Poland ) [class] => IN [ttl] => 110 ) [5] => Array ( [host] => onet.pl [type] => TXT [txt] => fax: +48 12 2774002 [entries] => Array ( [0] => fax: +48 12 2774002 ) [class] => IN [ttl] => 110 ) [6] => Array ( [host] => onet.pl [type] => TXT [txt] => tel: +48 12 2774000 [entries] => Array ( [0] => tel: +48 12 2774000 ) [class] => IN [ttl] => 110 ) [7] => Array ( [host] => onet.pl [class] => IN [ttl] => 145 ) [8] => Array ( [host] => onet.pl [type] => NS [target] => ns1.aster.pl [class] => IN [ttl] => 276 ) [9] => Array ( [host] => onet.pl [type] => NS [target] => dns1.onet.pl [class] => IN [ttl] => 276 ) [10] => Array ( [host] => onet.pl [type] => NS [target] => dns.onet.pl [class] => IN [ttl] => 276 ) [11] => Array ( [host] => onet.pl [type] => NS [target] => ns1.ikp.pl [class] => IN [ttl] => 276 ) [12] => Array ( [host] => onet.pl [type] => NS [target] => dns3.onet.pl [class] => IN [ttl] => 276 ) [13] => Array ( [host] => onet.pl [type] => NS [target] => dns2.onet.pl [class] => IN [ttl] => 276 ) )

a tu dla wp.pl
  1. Array ( [0] => Array ( [host] => wp.pl [type] => TXT [txt] => v=spf1 ip4:212.77.96.0/19 ip4:195.205.40.200/29 mx -all [entries] => Array ( [0] => v=spf1 ip4:212.77.96.0/19 ip4:195.205.40.200/29 mx -all ) [class] => IN [ttl] => 2876 ) [1] => Array ( [host] => wp.pl [type] => SOA [mname] => ns2.wp.pl [rname] => dnsmaster.wp-sa.pl [serial] => 2011070703 [refresh] => 900 [retry] => 600 [expire] => 86400 [minimum-ttl] => 3600 [class] => IN [ttl] => 3042 ) [2] => Array ( [host] => wp.pl [type] => NS [target] => ns2.wp.pl [class] => IN [ttl] => 3042 ) [3] => Array ( [host] => wp.pl [type] => NS [target] => ns1.wp.pl [class] => IN [ttl] => 3042 ) [4] => Array ( [host] => wp.pl [type] => NS [target] => ns1.task.gda.pl [class] => IN [ttl] => 3042 ) [5] => Array ( [host] => wp.pl [type] => A [ip] => 212.77.100.101 [class] => IN [ttl] => 3457 ) [6] => Array ( [host] => wp.pl [type] => MX [pri] => 0 [target] => mx.wp.pl [class] => IN [ttl] => 1382 ) [7] => Array ( [host] => wp.pl [type] => MX [pri] => 5 [target] => mx5.wp.pl [class] => IN [ttl] => 1382 ) )


w ktorej tablicy zawsze zwracane są dns
bo zazwyczaj z tego co widze to jest
[1][target]
[2][target]
itd
ale tak zawsze nie jest, jak to mozna z automatu zrobic aby wyswietlalo mi tylko adresy dns

Ten post edytował piotrek4523 7.07.2011, 21:57:59
Go to the top of the page
+Quote Post
CuteOne
post 7.07.2011, 23:57:29
Post #4





Grupa: Zarejestrowani
Postów: 2 958
Pomógł: 574
Dołączył: 23.09.2008
Skąd: wiesz, że tu jestem?

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


Naucz się posługiwać funkcjami "wspomagającymi" działania na tablicach Manual

Ten post edytował CuteOne 8.07.2011, 00:00:11
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 04:38