Пример #1
0
 /**
  * The class constructor initializes variables.
  * @param string $ip
  * @final
  */
 public final function __construct($ip = '')
 {
     if (empty($ip) && Http::RealIP()) {
         $ip = Http::RealIP();
     }
     if (empty($ip) === false || Server::PerlRegex() != false || @preg_match(self::REGX, trim($ip)) != false || Server::Json() != false) {
         $geo = @json_decode(@file_get_contents("http://api.2ip.com.ua/geo.json?ip={$ip}"), true);
         if (empty($geo) == false) {
             $this->data = array_merge($this->data, $geo);
         }
         $provider = @json_decode(@file_get_contents("http://api.2ip.com.ua/provider.json?ip={$ip}"), true);
         if (empty($provider) == false) {
             $this->data = array_merge($this->data, $provider);
         }
     }
 }
Пример #2
0
$b->add('Post Max Size', Server::PostMaxSize(), null, null, 'Finds and returns the post max size.');
$b->add('Register Globals', Server::RegisterGlobals(), null, null, 'Checking Register Globals.');
$b->add('Display Errors', Server::DisplayErrors(), null, null, 'Checking Display Errors.');
$b->add('PHP File Uploads', Server::PHPFileUploads(), null, null, 'Checking PHPFileUploads.');
$b->add('Server Time', Server::ServerTime(), null, null, 'Returns the current server time.');
$b->addHeader('High Load.');
$b->add('Actual Memory Limit', HighLoad::ActualMemoryLimit(), 128, '>', 'Checks the actual memory limit.');
$b->add('Number Cpu Operations', HighLoad::NumberCpuOperations(), null, null, 'Number of operations of the CPU.');
$b->add('Number File Operations', HighLoad::NumberFileOperations(), null, null, 'Number of file operations.');
$b->add('Actual Execution Time', HighLoad::ActualExecutionTime(50), null, null, 'Checks real-time execution of the script.');
$b->add('Sending Big Emails', HighLoad::SendingBigEmails(), null, null, 'Checking the sending big emails.');
$b->add('Uploads Big File', HighLoad::UploadsBigFile(1000), null, null, 'Checking upload big files to the server.');
$b->addHeader('Http server.');
$b->add('Server', Http::Server(), null, null, 'Finds the current http server.');
$b->add('Protocol', Http::Protocol(), null, null, 'Gets the protocol HTTP.');
$b->add('Real IP', Http::RealIP(), null, null, 'Gets real ip address of the server.');
$b->add('Authorization', Http::Authorization(), null, null, 'Checks authorization via http.');
$b->add('Sessions', Http::Sessions(), null, null, 'Checks work sessions via http.');
$b->add('SSL', Http::SSL('www.google.com'), null, null, 'Checks operation ssl via http.');
$b->add('SSL Lib Version', Http::SSLLibVersion(), null, null, 'Checks ssl Version.');
$b->add('Local Redirect', Http::LocalRedirect(), null, null, 'Checks work local redirect via http.');
$b->addHeader('File system.');
$b->add('Disk Space', FileSystem::DiskSpace(), '255', '<', 'Checking disk space.');
$b->add('Permissions Folder', FileSystem::PermissionsFolder(), '0777', '>', 'Checking access rights to the folder.');
$b->add('Folder Creation', FileSystem::FolderCreation(), true, '=', 'Checking folder creation.');
$b->add('Folder Deletion', FileSystem::FolderDeletion(), true, '=', 'Checking delete the folder.');
$b->add('Permissions Folder Creation', FileSystem::PermissionsFolderCreation(), null, null, 'Checking access rights to the new folder.');
$b->add('File Creation', FileSystem::FileCreation(), null, null, 'Checking file creation.');
$b->add('File Deletion', FileSystem::FileDeletion(), true, '=', 'Checking delete the file.');
$b->add('Permissions File Creation', FileSystem::PermissionsFileCreation(), null, null, 'Checking access rights to the new file.');
$b->add('File Execution', FileSystem::FileExecution(), true, '=', 'Checking the execution file.');