PDA

View Full Version : see referal url in whos online


dreamer81
11-11-2005, 04:43 AM
Hi, i was wondering if it's possible to see the referal url (if any) in the whos online box??? that would be sweet wouldn't it?

vau7
11-11-2005, 06:16 AM
Do you mean the referer? The Site which the guest is coming from?

This would be absolut great!

dreamer81
11-11-2005, 06:57 AM
Yes that's what i mean.... sounds totally cool huh?? really a great idea i got there..
hope someone can make this

vau7
11-11-2005, 09:34 AM
the only negative point i can imagine is that it will be very perfomanceintensive.

dreamer81
11-11-2005, 09:47 AM
noo.. not at all....
it doesn't require performance to aquire the referal url....
im gonna look into this myself, im so hooked on the idea to do this :)

dreamer81
11-17-2005, 05:34 AM
bump

untold4you
11-17-2005, 02:35 PM
This could be done by printing out $_SERVER['HTTP_REFERER'], however:

'HTTP_REFERER' The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.

Anyway, should not be to hard to realize this.

Gr3?Tz...

dreamer81
11-17-2005, 02:43 PM
This could be done by printing out $_SERVER['HTTP_REFERER'], however:



Anyway, should not be to hard to realize this.

Gr3?Tz...

tried that, the problem is to get the url into the user object.... :(

I save the url in a variable in global_start hook
but that variable is not available in the whosonlinebit... :(

if just i knew how to save the url in a $vbuser or whatever that var is called

Marco van Herwaarden
11-17-2005, 07:11 PM
Do a global of that var.

dreamer81
11-18-2005, 04:15 AM
Do a global of that var.

umm... how would I do that?

The problem is that i want to see all the refferer urls for all users. So i need to save them in the user var. *sigh*.... im giving up

Marco van Herwaarden
11-18-2005, 05:59 AM
global $myvar;
$myvar = "Whatever i want in this variable";

dreamer81
11-18-2005, 06:52 AM
global $myvar;
$myvar = "Whatever i want in this variable";

But

When a user enteres my page, the global_start hook is run. I save the referrer url in a global variable for each user. The variable is named the same though, but should contain different values for each user.

When I click on whosonline, the whosonlinebit template is run. Here i want to print out the referal url for each user. That is not possible because the whosonlinebit template doesn't print out my global variable. Plus how does it know which global variable belongs to which user?

I also posted this at vb.com
http://www.vbulletin.com/forum/showthread.php?t=163168

Marco van Herwaarden
11-18-2005, 03:51 PM
Sorry to say, but the way you are trying it will never work. You will at least have to store the information for each user in a table.

I suggest you ask someone else if they can make something for you.

dreamer81
11-19-2005, 07:46 AM
I can do it, if someone will just tell me how.

I tried this instead. I modified the userinfo class to contain one more string called ref.
and i fill it in index.php

but it wont print it in the whosonlinebit...??

Marco van Herwaarden
11-19-2005, 08:27 AM
The session table sounds more suitable for this to me.