芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/status.pulsehost.co.uk/app/helpers/links.php
[ 'clientId' => '', 'clientVersion' => '1.5.2' ], 'threatInfo' => [ 'threatTypes' => ['MALWARE', 'SOCIAL_ENGINEERING','THREAT_TYPE_UNSPECIFIED'], 'platformTypes' => ['ANY_PLATFORM'], 'threatEntryTypes' => ['URL'], 'threatEntries' => [ ['url' => $url] ] ] ]); $headers = [ 'Content-Type' => 'application/json', 'Authorization' => 'Token :)' ]; $response = Unirest\Request::post($api_url, $headers, $body); if(isset($response->body->matches[0]->threatType) && $response->body->matches[0]->threatType) return true; return false; } function get_domain_from_url($url) { $host = parse_url($url, PHP_URL_HOST); if(filter_var($host, FILTER_VALIDATE_IP)) return $host; /* Return only the last 2 array values combined */ return get_domain_from_host($host); } function get_domain_from_email($email) { $host = explode('@', $email)[1]; return get_domain_from_host($host); } function get_domain_from_host($host){ $myhost = mb_strtolower(trim($host ?? '')); $count = substr_count($myhost, '.'); if($count === 2){ if(mb_strlen(explode('.', $myhost)[1]) > 3) $myhost = explode('.', $myhost, 2)[1]; } else if($count > 2){ $myhost = get_domain_from_host(explode('.', $myhost, 2)[1]); } return $myhost; }