Jump to content
MakeWebGames

rulerofzu

Members
  • Posts

    2,464
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by rulerofzu

  1. Unless your called Mike09 from dev-forum then this is not yours.
  2. This code here   function valid_email($email) { // First, we check that there's one @ symbol, and that the lengths are right if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { // Email invalid because wrong number of characters in one section, or wrong number of @ symbols. return false; } // Split it into sections to make life easier $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) { return false; } } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; // Not enough parts to domain } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } return true;}   Is in the original register.php that comes with mccodes v2 which is from the linux site that I have mentioned.
  3. I didnt say you did. Blade said you have got it from google :P Part of the email validation which is what you used to do this and also used in the original MC2 script, I believe is, from that forum. In the same way the db class used in MC2 is from a different website. I was just pointing out a preg_match replacement seen as ereg/i is out.
  4. Go back to asking for help Blade. :P
  5. The whole email check function was posted on a linux forum back in 2007 May interest you to find that it was updated to the following. Not tested it though.   function validEmail($email){ $valid = true; $findats = strrpos($email, "@"); if (is_bool($findats) && !$findats) { $valid = false; } else { $domain = substr($email, $findats+1); $local = substr($email, 0, $findats); $locallength = strlen($local); $domainlength = strlen($domain); if ($locallength < 1 || $locallength > 64) { $valid = false; } elseif ($domainlength < 1 || $domainlength > 256) { $valid = false; } elseif ($local[0] == '.' || $local[$locallength-1] == '.') { $valid = false; } elseif ((preg_match('/\\.\\./', $local)) || (preg_match('/\\.\\./', $domain))) { $valid = false; } elseif (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain)) { $valid = false; } elseif (!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/', str_replace("\\\\","",$local))) { if (!preg_match('/^"(\\\\"|[^"])+"$/', str_replace("\\\\","",$local))) { $valid = false; } } elseif (!(checkdnsrr($domain,"MX") || checkdnsrr($domain,"A"))) { $valid = false; } } }
  6. ereg is depreciated as of php 5.3
  7. Har har har!
  8. The header has include "mainmenu.php"; replace that with include "mainmenu1.php";
  9. Best wishes to your sister.
  10. rulerofzu

    Html 5

    With things like this I prefer to sit on the fence for a bit longer. Cross browser issues are bad enough at the moment. Its a wait and see what each browser devel company decides to implement and how.
  11. Still looks an back to front way of doing it lol. Well done Alabama.
  12. Dave when you wanna fix the donator mod I paid you for and send it to me as the last release still does not work then you can tell me to stfu. :P If this was a noob posting for the first time then sure but cmon CJ has been around long enough to know better. TBH all I did was point out the obvious and say ooops. It was the reply with I dont care which I thought was wrong. But heyho...its free so *cough* well done *cough*
  13. $q=$db->query("SELECT surWAR FROM surrenders WHERE surID={$_POST['sur']}"); list($_POST['war']) = $db->fetch_row($q);   Doesnt look right to me. Why would you be selecting from the surrenders table before you surrender the war.   Surely you should be getting the id from gangwars. selecting the id you wish to surrender to then inserting into the surrenders table?
  14. When you declared the war did you check the values was inserted into the db correctly?
  15. If you dont care why bother? Or are you looking for newbies to use it so you can then head over to their game?
  16. $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];   oops !
  17. You was just told how you are creating errors On line 34, you are ending your echo with a double quote, but starting it with a single quote. Because of that, you are screwing up your next 2 functions. Make sure to look at where the colours change. change line 34 to this: Race Change ';   Now go look at your next error and see your mistake!
  18. This is quite common with your posts where you are not actually reading the error reported. Look at the code. Ill give you a hint....look at line 180
  19. Use ob_start(); to avoid chances of errors then. Oh and look up at php.net which one is preferred and why.
  20. ob_start ("ob_gzhandler");   I dunno about that. It requires zlib installed on the server. So if you have zlib then your better just using zlib output compression.
  21. I like it. Will use it. Thanks
  22. I have Crimgame on my msn....bet he don't even realise its me....i feel honoured. 8o
  23. I thought he already was :D
  24. Price: ~$1000.00usd negotiable I know this say negotiable. However it is only worth more than the mc2 lic cost and theme if it is generating a proven income in my opinion and why does it say over 5000 registered and over 100 online when I logged in there was 3 online and only found 26 players 8|
  25. Still looking for someone who has the required skills. Edit....found someone with the req skills.
×
×
  • Create New...