Re[2]: [PHP] Dnsquery
| From: | Gianluca Baldo | Date: | Fri, 17 Aug 2001 08:46:16 +0000 |
| Subject: | Re[2]: [PHP] Dnsquery | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-63156@lists.php.net to get a copy of this message | ||
JH> I think you need to assign it to a variable and then echo that:
JH> $dnsquery = exec("dnsquery -h domain.net");
JH> echo $dnsquery;
This is from the manual:
"exec() executes the given command, however it does not output
anything"
Use system instead.
Cheers,
Gianluca
JH> -----Original Message-----
JH> From: J.Mueller, pro.vider.de GmbH [mailto:j.mueller@pro.vider.de]
JH> Sent: 17 August 2001 09:29
JH> To: 'php-general@lists.php.net'
JH> Subject: [PHP] Dnsquery
JH> Hello,
JH> I've tried to execute the system function dnsquery, which works fine
JH> from a shell:
JH> % dnsquery -h domain.net
;; ->>>HEADER<<- opcode: QUERY, status: NOERROR, id: 61611
JH> ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2
JH> ;; domain.net, type = ANY, class = IN
JH> domain.net. 2D IN NS NS2.domain.net.
JH> domain.net. 2D IN NS NS1.domain.net.
JH> domain.net. 2D IN NS NS2.domain.net.
JH> domain.net. 2D IN NS NS1.domain.net.
JH> NS2.domain.net. 2D IN A 198.182.225.2
JH> NS1.domain.net. 2D IN A 204.107.140.2
JH> but not with PHP-functions, e.g.
JH> system("dnsquery -h domain.net");
JH> exec("dnsquery -h domain.net");
JH> There is no output at all. I'm using FreeBSD 4.2 Server, Apache 1.3.11, PHP
JH> 4.04
JH> Does anyone have an idea how I can get this work?
gianluca.baldo@bcninedita.com
BcnInédita
EURO RSCG INTERACTION
www.bcninedita.com
Planella, 39
08017 Barcelona
Tel.34 932 531 950 (directo 93 253 19 53)
Fax. 34 932 114 546