Cant get user's IP address when calling a script from a plugin
I have a plugin that displays events from another part of my website unrelated to vBulletin. I want to write each information about each time an event is displayed to a database table and include the user's IP address in the data.
I'm adding the plugin as "global_start" and calling a variable called $show_event in my template files. In the plugin code I assign $show_event = implode('', 'www.mywebsite.com/forums/event.php');
$_SERVER['REMOTE_ADDR'] gives me my server's IP rather than the user's IP because of the way vBulletin calls up the plugins. I need the user's IP.
I note that plugins using "style_fetch" as the hook location use $_SERVER['REMOTE_ADDR'] successfully, but I have to use "global_start".
I can't access any global variables from event.php. If anyone can suggest anything I'd appreciate it.
|