e-mail during the registration - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: e-mail during the registration (
/showthread.php?tid=282109)
e-mail during the registration -
PawnNewCommer - 09.09.2011
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?
Re: e-mail during the registration -
Lorenc_ - 09.09.2011
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...
Re: e-mail during the registration -
Kingunit - 09.09.2011
You better create a PHP page - so people can register there. With PHP there is a function to check it.
Re: e-mail during the registration -
PawnNewCommer - 09.09.2011
i find this function
Код:
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?
Re: e-mail during the registration -
brett7 - 09.09.2011
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.