I'm too stupid to get the right variables... I'm too stupid to get the right variables...
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

I'm too stupid to get the right variables...

Started by lamama, October 06, 2004, 04:25:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lamama

I thought it would be nice to know what users watch which picture in my  gallery.

So I tried to write a simple logger (writes into a separate database table everytime a picture is displayed)

Everything works fine, but...

I'm only too stupid to find out where I get the required values in which (global?) variables.

The logger is placed inside displayimage.php, function html_picture()  because it looked like a proper place to put it.
I want to log
- album
- URL of the Pic
- Username
- IP of User

Album and URL is no problem, but where to get the Username and the IP from? ???
Or do I have to place the logger lines somewhere else?

I'm sorry if that is a newbie question (i fear it is)...  ::)

Nibbler

There is the constant USER_NAME which holds the username and you can get the IP witrh $raw_ip and $hdr_ip or from the server vars directly. You may need to global the ip vars to be able to use them inside the function.

lamama