/* -------- AJAX Domain Availablity Check script (Version 0.8) ------------ [ [ Created by "Ganesh" @ http://www.bootstrike.com [ AJAX Domain Availability Check by Bootstrike.Com is licensed under a Creative Commons Attribution 3.0 License. [ Based on a work at http://www.mattjewell.com/namepros/dnlookup/. [ Permissions beyond the scope of this license may be available at http://www.bootstrike.com/PHPAJAXDomainCheck/. */ /*** ORIGINAL CREDIT SCRIPT ****/ /* -------- Bulk domain availablity check script (Revision 4) ------------ [ [ Created by "Matthew." (45276) @ http://namepros.com / http://mattjewell.com [ Feel free to modify/use however you wish, [ but keep credit comments in upon distribution. */ /**************************************************** Multi Entry Domains Enquiry Max at One Time - set to -1 for unlimited. If you set to -1, uncomment set_time_limit below to allow the script more time ****************************************************/ define ("MAX_DOMAINS_AT_ONE_TIME",10); /**************************************************** Uncomment to make unlimited script execution time - not recommended for shared hosting ****************************************************/ //set_time_limit(0); //to prevent other domains from misusing the AJAX script if (session_id() == "") session_start(); if (!isset($_REQUEST['aj'])) $_SESSION['IS_FROM_SAME_DOMAIN'] = 1; $referrerDomain = ""; if (isset($_SERVER['HTTP_REFERER'])) { //extract referrer domain $referrerDomain = $_SERVER['HTTP_REFERER']; $referrerDomain = substr($referrerDomain,strpos($referrerDomain,"http://")+7); $referrerDomain = substr($referrerDomain,0,strpos($referrerDomain,"/")); } include 'dnservers.php'; $error = ""; function save_file($status) { /**************************************************** Comment to enable file save ****************************************************/ echo "disabled file save!"; exit; //comment this line to enable file saving! global $filename, $domain, $extension; $domain = trim($domain); $file_handle = fopen($filename . "_$status.txt", 'a+') or trigger_error('Cannot open or create file (chmod?)', E_USER_WARNING); if($status == 'invalid' && $extension == 'org') { $status .= ' (.org WHOIS prevents request)'; } if(!fwrite($file_handle, $domain . " is $status\n")) { trigger_error('Results for ' . $domain . ' could not be written.', E_USER_WARNING); } fclose($file_handle); } function return_status($domain, $status) { global $extension, $filename, $error; $file = $filename; $domain = trim($domain); if ($error != "") $status = "invalid"; if(isset($_POST['save'])) { save_file( $status ); } else { $color = ($status == 'available') ? 'green' : 'red'; if($status == 'invalid' && $extension == 'org') { $status .= ' (.org WHOIS prevents request)'; } echo "
|
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||