Join the forums now, and start posting to receive access to our Scripts Vault!
How do you cut back on cheaters if there is no email validation?
function valid_email($Address){//just makes sure email address is valid if (ereg('^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$', $Address) && !ereg('anonymously', $Address) && !ereg('regbypass', $Address) && !ereg('dodgelt', $Address) && !ereg('dontreg', $Address) && !ereg('e4ward', $Address) && !ereg('gishpuppy', $Address) && !ereg('guerillamail', $Address) && !ereg('haltospam', $Address) && !ereg('jetable', $Address) && !ereg('kasmail', $Address) && !ereg('mailexpire', $Address && !ereg('maileater', $Address) && !ereg('mailinator', $Address) && !ereg('mailnull', $Address) && !ereg('mytrashmail', $Address) && !ereg('nobulk', $Address) && !ereg('nospam', $Address) && !ereg('nospamfor', $Address) && !ereg('pookmail', $Address) && !ereg('shortmail', $Address) && !ereg('sneakmail', $Address) && !ereg('spam', $Address) && !ereg('spambob', $Address) && !ereg('spambox', $Address) && !ereg('spamday', $Address) && !ereg('spamfree24', $Address) && !ereg('spamh0le', $Address) && !ereg('spaml', $Address) && !ereg('spamgourmet', $Address) && !ereg('tempemail', $Address) && !ereg('tempinbox', $Address) && !ereg('temporaryinbox', $Address) && !ereg('willhackforfood', $Address) && !ereg('willselfdestruct', $Address) && !ereg('wuzupmail', $Address)) ) { return true; } else { return false; }}
/** * * Email Validator * * Validate an email address, Provide email address (raw input) Returns true if the email address has the email address format and the domain exists. * * @param $email string Email Address * @return $isValid bool The result false if it isn't valid*/function validemail($email){ $isValid = true; $atIndex = strrpos($email, "@"); if (is_bool($atIndex) && !$atIndex) { $isValid = false; } else { $domain = substr($email, $atIndex+1); $local = substr($email, 0, $atIndex); $localLen = strlen($local); $domainLen = strlen($domain); if ($localLen < 1 || $localLen > 64) { // local part length exceeded $isValid = false; } else if ($domainLen < 1 || $domainLen > 255) { // domain part length exceeded $isValid = false; } else if ($local[0] == '.' || $local[$localLen-1] == '.') { // local part starts or ends with '.' $isValid = false; } else if (preg_match('/\\.\\./', $local)) { // local part has two consecutive dots $isValid = false; } else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain)) { // character not valid in domain part $isValid = false; } else if (preg_match('/\\.\\./', $domain)) { // domain part has two consecutive dots $isValid = false; } else if(!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/', str_replace("\\\\","",$local))) { // character not valid in local part unless // local part is quoted if (!preg_match('/^"(\\\\"|[^"])+"$/', str_replace("\\\\","",$local))) { $isValid = false; } } if ($isValid && !(checkdnsrr($domain,"MX") ||checkdnsrr($domain,"A"))) { // domain not found in DNS $isValid = false; } if($domain=='example.com'||$domain=='crimsonstrife.net'||$domain=='transcendental.org'||$domain=='transcendentalinc.net'){ $isValid = false; } } return $isValid;}
/** * * Spambot Checker * * This function checks to see if the person's IP Address of Email address are on the blacklist and thus shouldnot be allowed to enter the game world. * * @param $mail string The email address to be checked * @param $ip integer The IP Address to be checked * @return $spambot bool If they are on the list it returns true else it returns false. * */function checkspambots($mail,$ip,$name){ $spambot = false; //put the main domains in the array $main_domains = array('mail.ru','bigmir.net'); //check the e-mail adress $xml_string = file_get_contents('http://www.stopforumspam.com/api?email='.$mail); $xml = new SimpleXMLElement($xml_string); if($xml->appears == 'yes'){ $spambot = true; }elseif($spambot != true){ //e-mail not found in the database, now check the ip $xml_string = file_get_contents('http://www.stopforumspam.com/api?ip='.$ip); $xml = new SimpleXMLElement($xml_string); if($xml->appears == 'yes'){ $spambot = true; } } //check the main domains if there is still no spammer found, you can add more if you want in the $main_domains array if($spambot != true){ for($i = 0; $i < count($main_domains); $i++){ if(ereg($main_domains[$i],$mail) == 1){ $spambot = true; } } } // create an .txt file with the info of the spambot, if this one already exists, increase its amount of try's if($spambot == true){ if(file_exists('spambots/'.$mail.'.txt')){ $spambot_old_info = file_get_contents('spambots/'.$mail.'.txt'); $spambot_old_info = explode(',',$spambot_old_info); $spambot_old_info[2] = $spambot_old_info[2]+1; $spambot_old_info = implode(',',$spambot_old_info); file_put_contents('spambots/'.$mail.'.txt',$spambot_old_info); }else{ $spambot_info = $ip.','.$name.',1'; file_put_contents('spambots/'.$mail.'.txt',$spambot_info); } } return $spambot;}
Was hoping for some array of @.... to easily add it...**** it I'm lazy