esthera
06-21-2006, 10:35 AM
I have the following code:
list($temail, $hostname) = explode("@", $temail); list($name, $type) = explode(".",$hostname);
switch($type)
{
case "com";
case "net";
case "us";
case "info";
case "org";
case "biz";
$domainvalid=true; break;
default;$filtered=1;
}
what it does is check the email and if the domain is not one on the list then it sets $filtered=1.
the problem with this is that it is also filetering something like a@a.a.com (wherever there is a subdomain.) how can I fix this?
list($temail, $hostname) = explode("@", $temail); list($name, $type) = explode(".",$hostname);
switch($type)
{
case "com";
case "net";
case "us";
case "info";
case "org";
case "biz";
$domainvalid=true; break;
default;$filtered=1;
}
what it does is check the email and if the domain is not one on the list then it sets $filtered=1.
the problem with this is that it is also filetering something like a@a.a.com (wherever there is a subdomain.) how can I fix this?