Hi
I have a php script that does a host command and returns what I want, BUT I can’t get it to print the way I want??? Please help.
foreach ($host_list as $value){
echo “You entered $value, the result is:
”;
$host = host -W 1 $value
;
echo $host . “
”;
}
Now lets say I did my query on yahoo.com my current code displays it like:
You entered yahoo.com, the result is:
yahoo.com has address 216.109.127.29 yahoo.com has address 216.109.127.30 yahoo.com has address 66.218.71.112 yahoo.com has address 66.218.71.113 yahoo.com has address 66.218.71.114 yahoo.com has address 216.109.127.2
My goal is:
You entered yahoo.com, the result is:
yahoo.com has address 216.109.127.29
yahoo.com has address 216.109.127.30
yahoo.com has address 66.218.71.112
yahoo.com has address 66.218.71.113
yahoo.com has address 66.218.71.114
yahoo.com has address 216.109.127.2
Please advise… Thanks
Rob