btw, this is how it is done using a Javascript.
(placed inside the head tags):
<script language="javascript">
var refarray = new Array();
refarray['phpbuilder.com'] = "../phpbuilder/";
for (var i in refarray) {
if (document.referrer.indexOf(i) != -1) window.location.replace(refarray[i]);
}
</script>
I want to avoid the head tags and trim the refering url using
$_SERVER['HTTP_REFERER']
l know this is a long shot, and I have no idea what I am doing here, but I was just thinking it should be done doing something like this:
$url = Array(
'phpbuilder.com',
'google.com',
//etc.
);
// trim the url (not sure how)
if ($referer == "$url "){
//Redirect the refering url
}
Thanks for any help.