I want to create a page where I enter an IP address then exec() to run
whois and then display the output. I like to do this in PHP 5.

This is what I try:

$arg = trim($_GET[ip]);  // get IP address

echo    "<pre><br>ARIN:<br>";
$out    = "/home/website/work/" . $arg . ".txt" ;
$cmd    = "whois -h whois.arin.net " .$arg . " >" . $out ;
exec    ( $cmd );
include ( $out );
echo    "</pre>";

The output file is created but no content. The directory is chmod'ed to 777...

The command works fine from the command line.

Any ideas?

Gerry

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to