I have written a hit counter script that records the referring url to a web page. However, my ISP "blocks" the HTTP_REFERER variable (so it cannot be accessed in PHP or Perl) for "security reasons" which they would not explain so I have had to use a work around in JavaScript (grabbing the document.referer). This works OK unless JavaScript is turned off (obviously!).
Is there any way to get at the information in PHP and is there a valid security reason to block this information?
HTTP_REFERER Variable Blocked - Why?
Moderator: General Moderators
-
thewebmushroom
- Forum Newbie
- Posts: 3
- Joined: Fri May 23, 2003 10:47 am
- Location: Yorkshire, UK
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
Re: HTTP_REFERER Variable Blocked - Why?
Read this thread reply (by werlop), I think it can help you.thewebmushroom wrote:Is there any way to get at the information in PHP?
Regards,
Scorphus.
-
thewebmushroom
- Forum Newbie
- Posts: 3
- Joined: Fri May 23, 2003 10:47 am
- Location: Yorkshire, UK
Re: HTTP_REFERER Variable Blocked - Why?
Thanks for that Scorphus.
Basically that is how I worked it out (although I used Perl rather than PHP to generate a blank image - not sure why to be honest!).
My ideal solution would be to avoid using JS altogether, although I guess that this is impossible if the HTTP_REFERER is blocked by the server configuration of my ISP. Only solution is to change my ISP or setup my own server!
Any ideas why they wish to block this variable?
Basically that is how I worked it out (although I used Perl rather than PHP to generate a blank image - not sure why to be honest!).
My ideal solution would be to avoid using JS altogether, although I guess that this is impossible if the HTTP_REFERER is blocked by the server configuration of my ISP. Only solution is to change my ISP or setup my own server!
Any ideas why they wish to block this variable?