Hello,
I have a script which uses if available the function exec() like:
exec("whois -h whois.crsnic.net \"domain.com\"", $buffer);
or if the server is a windows type or in case of that the command line is not accessible:
function get_whois_data($test_server, $test_domain) {
$msg = "";
$connection = fsockopen($test_server, 43, $errno, $errstr, 10);
if (!$connection) {
$msg = "Can't connect to the server!";
} else {
sleep(2);
fputs($connection, $test_domain."\r\n");
while (!feof($connection)) {
$msg .= fgets($connection, 4096);
}
fclose($connection);
}
return $msg;
}
I think that "function_exits()" will work but what if "safe_mode_exec_dir" is set to some value?