istediğin asp mi php mi?
ASP
Kod:
Public Function EmailControl(myEmail)
'|
'| EMail Control
'| Coded By PsyChaos
'| A.K.A Semih Turna
'|
Dim isValidE
Dim regEx
isValidE = True
Set regEx = New RegExp
regEx.IgnoreCase = False
regEx.Pattern = "^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
isValidE = regEx.Test(myEmail)
EmailControl = isValidE
End Function
If EmailControl("deneme@deneme.com") = False Then
Response.Write "Girilen E-Mail adresi yanlış"
Else
'İşlemler buraya
End If
PHP
Kod:
<?
if(!preg_match("'^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$'","deneme@deneme.com")){
echo "Hatalı mail adresi !";
}else{
//işlemler buraya
}
?>