homepage Welcome to WebmasterWorld Guest from 54.196.63.93
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Realtime URL collection;
I'm lookin for where the user is, not where he/she came from.
Willis

10+ Year Member



 
Msg#: 4173 posted 3:03 am on Jun 23, 2004 (gmt 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?

 

digitalv

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4173 posted 3:20 am on Jun 23, 2004 (gmt 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 ;)

Timotheos

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4173 posted 4:54 am on Jun 23, 2004 (gmt 0)

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

Willis

10+ Year Member



 
Msg#: 4173 posted 5:17 am on Jun 23, 2004 (gmt 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?

pmdung

10+ Year Member



 
Msg#: 4173 posted 8:53 am on Jun 23, 2004 (gmt 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!

Willis

10+ Year Member



 
Msg#: 4173 posted 2:46 pm on Jun 23, 2004 (gmt 0)

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

psyborg

10+ Year Member



 
Msg#: 4173 posted 5:55 pm on Jun 23, 2004 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved