Any ideas why this function always returns 0?
$urls = array("rareearthdesign.com","urgent-lemon.com");
function validateReferer($urls){
foreach($urls as $url){
if(strstr($HTTP_REFERER,$url)){
return(1);
} else {
return(0);
}
}
}
I'm submitting form data from www.urgent-lemon.com, the function is supposed to disallow any input from a domain other than the ones in the array, but instead denies ALL input. HELP!
Thanks in advance!