Welcome to WebmasterWorld Guest from 54.163.25.166

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Realtime URL collection;

I'm lookin for where the user is, not where he/she came from.

     
3:03 am on Jun 23, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 4, 2004
posts:59
votes: 0


Right now I have a hits table that goes with my counter and it records as one would expect, every hit the user makes.

As is my recording part of the script is using

$referer=getenv("HTTP_REFERER");

I know that collects the referer; but I want the realtime url.

I've looked around and found:

$_SERVER['PHP_SELF']

But after I did some tests - that would not include anything after the index.php part; meaning:

ROOT/test.php?page=2 & ROOT/test.php

both equal:
/test.php

I need that - for example -?page=2 part.

How can I get it as the page exists, not waiting for the next click?

3:20 am on June 23, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 15, 2003
posts:1418
votes: 0


I'm not a PHP guy, but I've done a similar setup myself in ASP - what you need to do is take the query string data (there is a variable for this, in ASP it's just QUERY_STRING), prefix it with a question mark, and throw it in after the URL.

So you would be inserting URL?QUERY_STRING

Anyway ... hope this at least tells you where to look for the data ;)

4:54 am on June 23, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 13, 2003
posts:775
votes: 0


You want $_SERVER['REQUEST_URI'] [php.net]
5:17 am on June 23, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 4, 2004
posts:59
votes: 0


Thanks guys; digitalv I was given ur idea a shot but . . hehe its so much simpler when the feature is present automaticly. Thanks Timotheos makes this much easier for future plans.

Hey side question - - Is it possible using PHP to distinguish if the browser in question is using frames to view the site?

8:53 am on June 23, 2004 (gmt 0)

New User

10+ Year Member

joined:June 22, 2004
posts:13
votes: 0


Is it possible using PHP to distinguish if the browser in question is using frames to view the site?

PHP: no, but yes for javascript. You can use javascript check it, then call a page PHP which receive the result!
2:46 pm on June 23, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 4, 2004
posts:59
votes: 0


I understand what your saying but I don't know javascript so uhh . . yeh.

psyborg

5:55 pm on June 23, 2004 (gmt 0)

Inactive Member
Account Expired

 
 


Im sorry this is the wrong thread but i need an answer from Willis... the old thread was locked.

[webmasterworld.com...]

As a n00b...

"This entire time Ive been trying barn_de 's method; all I had to do was add one more line pointing out the location of php4ts.dll."

Exactly, what did that line contain? And where did you put it?

Thank you very much

/Björn