Hans J.J. Prins wrote:
Hello,

I seem to be having a little bit of trouble with executing a nslookup via
PHP's passthr() function.

This:
passthru("nslookup -query=ns testing12345.nl", $returnVar);

Returns:
"Server:  ns1.activedomain.nl
Address:  217.148.161.5
Aliases:  5.161.148.217.in-addr.arpa

0"

However, when I execute the nslookup command directly from my SSH client, I
get this result (minus the ---):
---
Server: ns1.activedomain.nl
Address: 217.148.161.5
Aliases: 5.161.148.217.in-addr.arpa

*** ns1.activedomain.nl can't find testing12345.nl: Non-existent host/domain
---

For some reason passthru does not pass back the last line. And that is
exactly the line that I need! I also tried exec(), system() and shell_exec()
But PHP does not give me that last line.

I should mention that I'm on a freeBSD system with Apache 1.3.32 and PHP
4.3.10

Can anyone help me out on this?

What do you get with shell_exec("nslookup -query=ns testing12345.nl")

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to