nah you got me wrong..
here is a perfect example of what am trying to get around.
$a = "1000";
$b = "1,000";
if ($a == $b) {
echo "same";
} else {
echo "different";
}
ok, now even though in a number only view point A and B are the same value, its just that one is formated differently to the other, so before you run the IF statment, you need to first get both values formated to the same
$a = "1000";
$b = "1000";
OR
$a = "1,000";
$b = "1,000";
then run the IF statment.
Now this is just what i am trying to do but with domain names instead, as the member who signs there website up might put in
http://yourdomain.com
and then someone else might input
www.yourdomain.com
So what i have is the same thing really just formatted differently, what i need is to format a domain name the same way all the time, so when i do my IF statements they return an error because there are not the same name, but because there are formated different.
Now thinking about it, i think its best to strip all http:// and www. from so your just left with the rest. then at least to make it a clickable link when publishing it on the website all i have to do is add that part to it at the front.
Now what i am using this for is a top list, the reason i am using the REFERER is for the following reason.
Basically i have a toplist website, your site moves up based on the votes it gets from your own website.
The way 99% of toplist sites work is, each person who signs up and submits there website gets a unique ID in a sample of code, something like this
www.topsites.com/in.php?ID=1748
now when you click on that link, which could be posted anywhere, on this forum even, it will take you to there site, and the in.php file would take the 1748 id and look it up in its database and add a vote to the website listing, moving it up the ladder
This can be abused so much, as you are not limited to having this code on your site but you can either put it in the url automatically or instead, post it on the forum and pretend its a link to something usefull, resulting in loads of people with DIFFERENT IPS voting for your site unexpectedly.
ok, now what i am doing is trying to stop that, instead i take the REFERER varible which is normally the path / domain which has sent them to your site from clicking on a link, not if in that REFERER varible the website is valid it will ad a vote as normal but say if it finds a website which doesnt exist in the database because the link was posted on a forum, then it wouldnt count, it would ignore it.
Does this make more sence.