473,625 Members | 3,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

http_referer empty? Firewalls?

Can one reliably use http_referer to track a user page selections as I
appear to be getting BLANK values?

I have read that company firewalls etc block this method....

Thanks
jason
Jul 19 '05 #1
8 5082
*j****@catamara nco.com* wrote:
Can one reliably use http_referer to track a user page selections

[snip]

No, it's strictly optional and is easily spoofed.
--
Andrew Urquhart
- FAQ: www.aspfaq.com
- Contact me: http://andrewu.co.uk/contact/
Jul 19 '05 #2
Thanks, are there any other viable alternatives?

- Jason

"Andrew Urquhart" <us************ **************@ spam.invalid> wrote in
message news:Of******** ********@newsfe 4-gui.ntli.net...
*j****@catamara nco.com* wrote:
Can one reliably use http_referer to track a user page selections

[snip]

No, it's strictly optional and is easily spoofed.
--
Andrew Urquhart
- FAQ: www.aspfaq.com
- Contact me: http://andrewu.co.uk/contact/

Jul 19 '05 #3
> Thanks, are there any other viable alternatives?

Post the data from page to page. Use session variables. Use a session
identifier in the querystring and store the data in the database.

As for the problems with HTTP_REFERER, see http://www.aspfaq.com/2169

--
http://www.aspfaq.com/
(Reverse address to reply.)
Jul 19 '05 #4
*j****@catamara nco.com* wrote:
*Andrew Urquhart* wrote:
*j****@catamara nco.com* wrote:
Can one reliably use http_referer to track a user page selections
[snip]


No, it's strictly optional and is easily spoofed.


Thanks, are there any other viable alternatives?


Ultimately the stateless nature of HTTP prevents this, but you can
attempt to do so via cookies, querystrings and form posts usually in
conjunction with some sort of database.
--
Andrew Urquhart
- FAQ: www.aspfaq.com
- Contact me: http://andrewu.co.uk/contact/
- This post is probably time-stamped +1 hour - blame my ISP (NTL)
Jul 19 '05 #5
*Aaron [SQL Server MVP]* wrote:
As for the problems with HTTP_REFERER, see http://www.aspfaq.com/2169


Possible additions for that FAQ entry:

"The situations where it doesn't work:"

10. If the user is using a Firewall or privacy filtering software
11. If the client allows referrers to be turned off (e.g. Opera,
Mozilla)

Perhaps there should also be a note on its reliability if it is present
because of ease of spoofing it?
--
Andrew Urquhart
- FAQ: http://www.aspfaq.com
- Contact me: http://andrewu.co.uk/contact/
- This post is probably time-stamped +1 hour - blame my ISP (NTL)
Jul 19 '05 #6
Would one have the same problem with the URL and PATH parameters...ma ybe I
could somehow string the original URL together useing these...

"Andrew Urquhart" <us************ **************@ spam.invalid> wrote in
message news:bK******** ********@newsfe 6-gui.ntli.net...
*Aaron [SQL Server MVP]* wrote:
As for the problems with HTTP_REFERER, see http://www.aspfaq.com/2169


Possible additions for that FAQ entry:

"The situations where it doesn't work:"

10. If the user is using a Firewall or privacy filtering software
11. If the client allows referrers to be turned off (e.g. Opera,
Mozilla)

Perhaps there should also be a note on its reliability if it is present
because of ease of spoofing it?
--
Andrew Urquhart
- FAQ: http://www.aspfaq.com
- Contact me: http://andrewu.co.uk/contact/
- This post is probably time-stamped +1 hour - blame my ISP (NTL)

Jul 19 '05 #7
Thanks

"Aaron [SQL Server MVP]" <te*****@dnartr eb.noraa> wrote in message
news:uM******** ********@TK2MSF TNGP11.phx.gbl. ..
Thanks, are there any other viable alternatives?


Post the data from page to page. Use session variables. Use a session
identifier in the querystring and store the data in the database.

As for the problems with HTTP_REFERER, see http://www.aspfaq.com/2169

--
http://www.aspfaq.com/
(Reverse address to reply.)

Jul 19 '05 #8
Special Note: Browser Hawk Referrer works like a dream, so problem solved!

I am testing for both persistent and client side cookies - See checktype 3:

<%
set bh = Server.CreateOb ject("cyScape.b rowserObj")

Response.write CheckType
checkType = 3

if checkType = 3 then
bh.SetExtProper ties "cookie_both,re ferrer"
elseif checkType = 2 then
bh.SetExtProper ties "cookie_ses s"
elseif checkType = 1 then
bh.SetExtProper ties "cookie_per m"
else
response.write "<html>bad checkType specified</html>"
response.end
end if
bh.GetExtProper tiesEx
%>

I then successfully called the bh.Referrer property....

Great component that!

Thanks
Jason
<ja***@catamara nco.com> wrote in message
news:Ol******** ******@TK2MSFTN GP10.phx.gbl...
Can one reliably use http_referer to track a user page selections as I
appear to be getting BLANK values?

I have read that company firewalls etc block this method....

Thanks
jason

Jul 19 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
30888
by: Jez | last post by:
Any ideas why I'm not able to use $_SERVER on my shared hosting account (PHP 4.1.2), but I can on my local server (PHP 4.3.3)? I imagine it has something to do with the different versions of PHP or perhaps php.ini, but I'm not sure what? Thanks! Jez
1
2208
by: Krzysztof Piotrowski | last post by:
Hi all, I hale recently started using php - god fun :-D I decided to make visits statistics. My webpage http://www.kolumb.net/ has a statistic at http://www.kolumb.net/mysql/list_stats.php I hale a problem with $HTTP_REFERER variable ("Visited From" column). Sometimes it seems empty, for no reason. Could anyone help??
9
28666
by: deko | last post by:
I have a page that I don't want anyone to be able to link directly to. The page should only be accessed from gatepage.php. I tried this code, but keep getting errors - "header info already sent", or something like that... Am I missing something, or is there a better way to do this? <?php $ref = $_SERVER; //echo $ref; if ( $ref == 'http://www.mydomain.com/gatepage.php' ) {
2
1512
by: James | last post by:
I'm using: Request.ServerVariables("HTTP_REFERER") And apparently this isn't "reliable" anymore? As in, some browsers/firewalls don't allow it? A small block of my code is based on knowing what page you were previously on, so this would be a problem. Any ideas? Thanks,
4
3419
by: agflem | last post by:
Is there any way to grab the HTTP_REFERER server variable in a pop up? Example: www.site1.com pops open www.site2.com that needs to see if it was popped from www.site1.com Currently, that value is empty. If not, are there any suggestions on how to test that a page was spawned from a site and not just typed into the address bar?
4
5280
by: Ringo Langly | last post by:
Hi everyone, We're using an outside vendor to provide some content for our website, and they use the http_referer variable to verify their content is only viewed from subscribing customers. Anyway, we're using the mm_menu javascript menu for our web menus, and under only Internet Explorer it's not passing the http_referer -- which means any site of theirs we link to from the menu doesn't work. This works fine in Firefox, Mozilla, and...
4
2587
by: Jake | last post by:
I need to know whether a request for a resource on our web server is coming from a particular affiliate domain or from another domain. In my testing, the HTTP_REFERER variable sometimes is empty. Under what circumstances can it be empty? Is there any way to know the origin of a request, for certain? Thanks Jake
22
2433
by: walterbyrd | last post by:
I like to develop on my desktop, then when I get stuff working, I copy to my web-site. I set up a new version Xampp on my windows-2k desktop. And downloaded the stuff from the website to edit. On the website, everything worked, on my desktop, nothing works. I am guessing this has to do with PHP versions. I know PHP breaks everything whenever they come out with a new version.
8
8973
by: mrsmithq | last post by:
I have a page that has this logic in it: //We can call it access.php if (!isset($_SESSION)){ header("Location:index.php"); exit(); } //Here is the index.php echo "<br>" . $_SERVER;
0
8694
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7184
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.