Results 1 to 3 of 3

Thread: How can one get the actual page a user linked from?

  1. #1

    Thread Starter
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    How can one get the actual page a user linked from?

    I use the environmen variable HTTP_REFFERER but that is inacurate for what I really need. It give me the domain name in most cases but how can I get the actual page that was linked from?

    What I am doing is doing statictics on my websites and want to know what kind of users we have and where they are finding info on us at. So, findng the webpage they came from is important for this. We want to visit the webpage and see just why the user linked to us. What kind of website give us as a reference and things like that so we can better understand our user needs.

    Can this be accomplished?

    I am using Perl (.cgi, .pl) Scripts. I know I the browser stores this type of history and I would like to get just the one page back after the user runs our download script.

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: How can one get the actual page a user linked from?

    Er,

    are you using Perl or PHP?

    in PHP at least, $_SERVER['HTTP_REFERER'] returns the full page.

    Don't know about CGI.

    Edit: OK now I read again I see your using perl so I cant really help.

    Bear in mind though the referer field can be easily supressed by the browser or a firewall, or spoofed as a wrong or fake URL. So it is in no means reliable.

  3. #3

    Thread Starter
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: How can one get the actual page a user linked from?

    Yes, I know the Referer is unreliable but we just need to visit the pages we find to find out something about our users to better serve them. Being able to get the current page that they are viewing when they click on the download would be ideal.

    Any way to accomplish this? Query the browser etc...
    Last edited by randem; Mar 12th, 2006 at 06:30 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width