Welcome to WebmasterWorld Guest from 54.196.212.62

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.

     

Willis

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

10+ Year Member



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?

digitalv

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

WebmasterWorld Senior Member 10+ Year Member



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 ;)

Timotheos

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

WebmasterWorld Senior Member 10+ Year Member



You want $_SERVER['REQUEST_URI'] [php.net]

Willis

5:17 am on Jun 23, 2004 (gmt 0)

10+ Year Member



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?

pmdung

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

10+ Year Member



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!

Willis

2:46 pm on Jun 23, 2004 (gmt 0)

10+ Year Member



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

psyborg

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

10+ Year Member



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

 

Featured Threads

Hot Threads This Week

Hot Threads This Month