I have script right now that will allow you to submit your url for inclusion in a list of sites but has some hand ups
I would like to block all subdomain submissions and co.cc submissions
Also would like for it to check for duplicate urls right now it let you submit with www. and without counting as two different urls which is giving me problems.
I think the following is the code for checking for an absolute duplicate ie both exactly the same like “example.com” and “example.com” or “www.example.com” and “www.example.com”
Should accept either with or without the www. but also know if it either way has been added before.
[CODE]
$sql2 = “SELECT * FROM {$db_tp}pending WHERE `sample`=’$sample'”;
$query = $db->query($sql2);
if (@mysql_num_rows($query)==1)
$errors[] = ‘That site has been added already’;
$sql3 = “SELECT * FROM {$db_tp}sample WHERE `sample`=’$sample'”;
$query1 = $db->query($sql3);
if (@mysql_num_rows($query1)==1)
$errors[] = ‘That site has already been added to our database’;
$sample = strtolower($sample);
}
To me it looks as though there are 2 checks here but both do the same thing. Not sure not enough knowledge to know.
Tried search for help on this via google looking for ways to block subdomain inclusions and I find nothing to be able to research this.
All help if it can be given is appreciated