Computing.Net > Forums > Web Development > PHP - logging web visitors

PHP - logging web visitors

Reply to Message Icon

Original Message
Name: Infinite Recursion
Date: September 15, 2004 at 06:44:06 Pacific
Subject: PHP - logging web visitors
OS: w2k
CPU/Ram: na
Comment:

I'm trying to get a log of where my visitors to my website came from using PHP. In particular, what site they were on, prior to coming to my site.

I have used the HTTP_REFFERER but for that to work, they would have to click a link that was on the site that they are coming from.

What I want to do in essence, is go back into their browser history one level to see
where they were before hand.

Do you all know whether or not if this is possible?

IR


Report Offensive Message For Removal

Response Number 1
Name: Jamie_McCoy
Date: September 15, 2004 at 07:07:14 Pacific
Subject: PHP - logging web visitors
Reply: (edit)

Not using PHP no

i suppose u cud do it in JAVASCRIPT, but thats not much use it you want to log it to file

if you could do it, you could potential view every site they have been on


Jaymc.co.nr


Report Offensive Follow Up For Removal

Response Number 2
Name: Infinite Recursion
Date: September 15, 2004 at 10:21:10 Pacific
Subject: PHP - logging web visitors
Reply: (edit)

Thnx. I'll have to look into it more.


Report Offensive Follow Up For Removal

Response Number 3
Name: SN
Date: September 15, 2004 at 12:40:17 Pacific
Subject: PHP - logging web visitors
Reply: (edit)

Hey IR-
thought of you the other day as I waited a couple minutes for one of my web pages to load, then froze up the server. Infinite recursion claimed another victim...

I thought maybe you could get the URL in javascript then send it in to PHP, but that's not possible very often.

Some netscape browsers give you access to the actual URLs in the history (DEVGuru History Object reference), but MS IE doesn't (IE History Object.)

Doesn't look like it's possible to do reliably. Maybe a Java applet could do it though...

Later,
-SN


Report Offensive Follow Up For Removal

Response Number 4
Name: Infinite Recursion
Date: September 16, 2004 at 06:17:06 Pacific
Subject: PHP - logging web visitors
Reply: (edit)

Hey SN... its been a while!

Yep, Infinite Recursion is the leading cause of death among programs. lol.

I also thought about using javascript to grab the browser history via 'history.previous' or something similiar and report it back to a PHP script. However, as you said, it would not be very reliable in regards to cross-browser operation.

Thanks for the links, I'm going to look into this more this weekend.

-IR


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: PHP - logging web visitors

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software