Page 1 of 1

$HTTP_REFERER problem :(

Posted: Mon Jul 08, 2002 6:19 am
by qads
hi,
i use a URL redirecting service for my site, so when i use $HTTP_REFERER to find where the user came from i get my own redirecting url, how i can i get the real address of the site which the user came from?

thanks alot in adv.

Posted: Mon Jul 08, 2002 7:03 am
by llimllib
Unless your referrer will agree to start POSTing the original referring site, I can't think of a way to get their original referrer. At the least, it's not a default PHP constant.

Posted: Mon Jul 08, 2002 7:41 am
by twigletmac
As llimllib said, there's really no way to do it without the cooperation of the people redirecting your site traffic. You can only grab the $HTTP_REFERER for the site/page immediately before the current page. Unless someone has a clever solution, I think you're stuck.

Mac

Posted: Mon Jul 08, 2002 5:46 pm
by qads
:(
ok.....hmmmm how about tring to do it with java script?

normaly you can do

Code: Select all

window.history.back(1)
(something like that)

would

Code: Select all

window.history.back(2)
work?
i would try it but i dont know ho wto get it in to php :x

Posted: Mon Jul 08, 2002 5:58 pm
by llimllib
sorry to say it, but I still don't think you can. I don't see a way to get a string containing the history at the mozilla man page for window.history.
I tried to do it for a few minutes, but i was unable - hopefully you'll have more luck.