You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Gerry Danen <gd...@gmail.com> on 2005/12/28 22:56:26 UTC

[users@httpd] Getting WHOIS info

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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org