HTTP_REFERER - not working when called from swf

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rcmehta_14
Forum Newbie
Posts: 1
Joined: Mon May 30, 2005 6:48 am

HTTP_REFERER - not working when called from swf

Post by rcmehta_14 »

Hi guys,

I have a strange problem. I have a file "temp.php" with a flash object within it. The flash object is set to call a link on it's "click" event.

My problem is that upon clicking on flash, the called page (say temp1.php) has $_SERVER[HTTP_REFERER] = NULL...... ie. it is not setting prooperly..

Strange thing is that it is working fine with Mozilla Firefox but it is not working in Internet Explorer.

Any help is appreciated..!!

Thanks,
Ritesh
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

'HTTP_REFERER'
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
http://us2.php.net/reserved.variables
hongco
Forum Contributor
Posts: 186
Joined: Sun Feb 20, 2005 2:49 pm

Post by hongco »

yeah, if a new windows popup from a link, it won't show referer on IE.
crossland
Forum Newbie
Posts: 2
Joined: Thu Aug 10, 2006 6:27 pm

Post by crossland »

Is there any way round this, even if means resorting to something like Javascript?

My requirement is to be able to get the URL of the referring site, even if it is from a target="_blank" link.

Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Referrer information is wholely unreliable. Some proxies and routers strip the information from requests. Browsers can be set to not give the information out too. Javascript is not a solution either. While you may catch a few more pieces of information through it, you cannot guarantee 100%.
Post Reply