PHP Code:
<?
//Email validation for a domain - written by Adrian Gurney
// You need to pass a variable called "email" to the script, which will then check that variable
// CONFIGURATION
$domainname = "mydomain.com";
$findstring = "@";
//END CONFIGURATION
$result = strchr($email,$findstring);
$result = substr($result, 1);
If ($result == $domainname) {
?>
<html>
<head>
<title>Agents email validation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Put your script or file contents here - email is correct
</body>
</html>
<?
}
else
{
?>
<html>
<head>
<title>Agents email validation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Put error message here - email isnt valid
</body>
<?
}
?>
Im going to start charging for this
You need to pass the variable to the scrip with the name "email" - how you do this is upto you. I suggest you use POST.