I am wanting to use PHP to do something like the following:
perform an nslookup, which I accomplish with:
$nslookup = `nslookup`;
then the prompt would give me a ">" which is asking for parameters. I then want to type in "server so-and-so", then when the server gives the next ">", I want to type in "set q=txt" and so on and so forth. How would I go about having php type these values in? It is not exactly like 3 different commands, it is more like one command with parameters added after the first ENTER. Any help would be great. Please let me know if you need some clarification, I know it is a bit confusing. Below is kinda what the server would look like if I was typing it in on Telnet, but I want this to be performed within PHP.
[whatever whatever]$ nslookup
Default Server: ns1.happy.com
Address: 12.158.184.1
server hairy.frank.net
Default Server: hairy.frank.net
Address: 209.30.182.2
set type=txt
whateveryouwant.com
Server: hairy.frank.net
Address: 209.30.182.2