$value ) if ( stripos( $value, $term ) !== false ) return $key; return false; } function remove_empty($array) { return array_filter($array, '_remove_empty_internal'); } function _remove_empty_internal($value) { return !empty($value) || $value === 0; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // echo ""; if(isset($_POST['domainnames'])) { require ("whoisClass.php"); $input = explode("\n", $_POST['domainnames']); $trimmedArray = array_map('trim', $input); $input = remove_empty($trimmedArray); foreach ($input as $domain) { $file = './domain_whois.txt'; $whois = new Whois; $data = $whois->whoislookup("$domain"); file_put_contents($file, $data); echo exec('/var/www/whois/fix_ca.sh'); $file = fopen("domain_whois.txt", "r"); $domain_info = array(); while (!feof($file)) { $domain_info[] = fgets($file); } fclose($file); // echo var_dump($domain_info); echo ""; echo ""; } echo "
Domain NameCreationExpirationRegistrarStatusNameServerScreenshot
"; $new_domainname = strtolower(str_ireplace("Domain Name: ","",$domain_info[0])); echo $new_domainname; echo ""; $new_creation = str_ireplace("Creation Date: ","",$domain_info[search_array($domain_info,"Creation")]); $new_creation = str_ireplace("Creation Date: ","",$new_creation); $new_creation = ltrim($new_creation); $new_creation = substr($new_creation,0,10); echo $new_creation; echo ""; $new_expiry = str_ireplace("Registry Expiry Date: ","",$domain_info[search_array($domain_info,"Expiry")]); $new_expiry = str_ireplace("Expiry date: ","",$new_expiry); $new_expiry = ltrim($new_expiry); $new_expiry = substr($new_expiry,0,10); echo $new_expiry; echo ""; $new_registrar = str_ireplace("Registrar:\n Name: ","Registrar:",$domain_info[search_array($domain_info,"Registrar:")]); $new_registrar = str_ireplace("Registrar: ","",$domain_info[search_array($domain_info,"Registrar:")]); echo $new_registrar; echo ""; $new_status = str_ireplace("Domain Status:","",$domain_info[search_array($domain_info,"status")]); $new_status = str_ireplace("Domain Status:","",$domain_info[search_array($domain_info,"Status")]); $new_status = ltrim($new_status); if (strlen($new_status) > 11){ $new_status = substr($new_status,0,strrpos($new_status,' '));} echo $new_status; echo ""; $new_nameserver = strtolower(str_ireplace("Name Server: ","",$domain_info[search_array($domain_info,"Name Server")])); echo $new_nameserver; echo ""; // $new_domainname = trim($new_domainname); // echo exec('/usr/local/bin/pageres --overwrite http://'.$new_domainname .' --filename=screenshots/'.$new_domainname); // echo ".$new_domainname"; echo "
"; } ?>
BULK WHOIS