PDA

View Full Version : Referral logging on per-file basis


liorean
06-06-2003, 11:51 AM
Can anybody help me with this in PHP? (I don't know PHP and have no time to learn...)

What I want is to have a script that I can redirect a file request to. Say if the client requests the file <http://example.net/foo.bar>. Then the script would write to the file <http://example.net/foo.bar.referrals>, a pure text file, the following:[BOF]datectime|userAgent|referrer[LF]
*previous entries*[EOF]
Then it would return <http://example.net/foo.bar> to the client.

The script call itself will be handled by mod_rewrite...

Fatman
06-06-2003, 12:36 PM
Could you not just stick some code in each pageu want logged and use something withg fopen and fwrite?

if you dont wanna do it yourself (or if your lazy ;)) email me - fatman@phatman.co.uk

Fatman