18/12/2020 10:33
Código PHP:
stock IsValidEmail(const email[]) // by Bruno13
{
new size = strlen(email);
if(size < 7)
return false;
new atFinded,
i;
for(i = 0; i < size; i++)
{
switch(email[i])
{
case 'A'..'Z', 'a'..'z', '0'..'9', '_', '.', '-': continue;
default:
{
if(email[i] == '@')
{
atFinded++;
continue;
}
return false;
}
}
}
return (atFinded == 1);
}