SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 09/09/2011, 03:19 PM   #1
PawnNewCommer
Little Clucker
 
Join Date: Jul 2009
Posts: 34
Reputation: 0
Default e-mail during the registration

In my gamemode i doing registration system. And enter email address when player register.
Is there any way that I validate an e-mail without plug-ins?
PawnNewCommer is offline   Reply With Quote
Old 09/09/2011, 03:23 PM   #2
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 4,122
Reputation: 928
Default Re: e-mail during the registration

Try see what you can do with Slices mail include, and play around with the http functions given in sa-mp 0.3b or 0.3c...
__________________

192.169.82.202:7777 - An awesome CnR server consisting of doozy features! Come, we have players!


Lorenc_ is offline   Reply With Quote
Old 09/09/2011, 03:23 PM   #3
Kingunit
High-roller
 
Kingunit's Avatar
 
Join Date: Dec 2010
Location: The Netherlands
Posts: 1,495
Reputation: 120
Default Re: e-mail during the registration

You better create a PHP page - so people can register there. With PHP there is a function to check it.
__________________
Kingunit is offline   Reply With Quote
Old 09/09/2011, 07:26 PM   #4
PawnNewCommer
Little Clucker
 
Join Date: Jul 2009
Posts: 34
Reputation: 0
Default Re: e-mail during the registration

i find this function

Code:
stock ValidEmail(email[]) {
  new len=strlen(email);
  new cstate=0;
  new i;
  for(i=0;i<len;i++) {
    if ((cstate==0 || cstate==1) && (email[i]>='A' && email[i]<='Z') || (email[i]>='a' && email[i]<='z')  || (email[i]=='.')  || (email[i]=='-')  || (email[i]=='_'))
    {
    } else {
       // Ok no A..Z,a..z,_,.,-
       if ((cstate==0) &&(email[i]=='@')) {
          // its an @ after the name, ok state=1;
          cstate=1;
       } else {
          // Its stuff which is not allowed
          return false;
       }
    }
  }
  if (cstate<1) return false;
  if (len<6) return false;
  // A toplevel domain has only 3 to 4 signs :-)
  if ((email[len-3]=='.') || (email[len-4]=='.') || (email[len-5]=='.')) return true;
  return false;
}

they work normal 50 %.
when enter e-mail: qwerty - script say that e-mail wrong.
when enter e-mail qwerty@gmail.com - script say that e-mail valid
but when enter e-mail @gmail.com - script say that e-mail valid too. But it wrong, bug.
Can you help repair it?
PawnNewCommer is offline   Reply With Quote
Old 09/09/2011, 09:59 PM   #5
brett7
Gangsta
 
brett7's Avatar
 
Join Date: Nov 2007
Location: UK, dun kno!!
Posts: 737
Reputation: 14
Default Re: e-mail during the registration

If I was you I would just leave it, it's a lot of effort and I think many people would just put in fake emails. Your better off just making a free forum or something.
brett7 is offline   Reply With Quote
Old 09/09/2011, 10:58 PM   #6
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 18,304
Reputation: 2572
Default Re: e-mail during the registration

Trust me, that validation code is WRONG!

"Alex Cole"@y-less.com

That is a VALID e-mail address, as are many other things you've probably never heard of! See this site for more information:

http://haacked.com/archive/2007/08/2...s-until-i.aspx
Y_Less is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] PWN Mail Exploder 0.3 Romanius Релизы/Releases 35 21/09/2013 01:11 PM
e-mail plugin denis1999 Help Archive 3 05/03/2010 06:26 AM
[HELP] mail roleplay501 Help Archive 5 02/06/2009 02:34 PM


All times are GMT. The time now is 01:05 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.