Closed Thread Icon

Topic awaiting preservation: Script for tracking image accesses (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=23699" title="Pages that link to Topic awaiting preservation: Script for tracking image accesses (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Script for tracking image accesses <span class="small">(Page 1 of 1)</span>\

 
krets
Paranoid (IV) Mad Scientist

From: Right-dead center
Insane since: Nov 2002

posted posted 10-18-2004 19:49

Have any of you ever run across a script you can run that will look through your referrer logs to track where an image has been accessed?

I made an image a while back for a contest at Fark.com that is getting passed around the net like crazy. I don't mind but I'd just like to see where it has popped up just for fun.

So far this month alone the image has over 3000 hits. My friends have gotten it sent to them in emails and passed it on to me. haha

http://www.11oh1.net/albums/lj/bushvkerry.jpg <-- That's it.

So any suggestions? I've been trying to Google but I'm don't even know what kind of search terms to use.

(I have Webalizer through my cPanel but I'd like a little more ability to search for specific files.)

:::11oh1:::

(Edited by krets on 10-18-2004 19:51)

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 10-18-2004 20:02

With an .htaccess you can route the access to this or any other image via little PHP script that will log the referers. You can log the infos in a database/text file, or simply send you a mail ( 3,000 is big but not that much )

krets
Paranoid (IV) Mad Scientist

From: Right-dead center
Insane since: Nov 2002

posted posted 10-18-2004 20:04

See, but I have no idea how to do any of that stuff. haha My knowledge of scripting is limited at best.

I kind of figured there would be scripts you could download that would do this. I wouldn't even mind paying a bit of dough if someone recommended a very good one.

:::11oh1:::

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 10-18-2004 21:06

The easiest/ugliest but yet efficient way should look like :

the .htaccess file :

code:
<FilesMatch "^bushvskerry.jpg$">
ForceType application/x-httpd-php
</FilesMatch>

the bushvskerry.jpg file :

code:
<?

mail( "you@yourDomain.com", "[log] a new hit on the picture", $_SERVER["HTTP_REFERER"] );

header( "Content-Type: image/jpeg" );
readfile( "the_real_picture.jpg" );

?>

Hope that helps,

krets
Paranoid (IV) Mad Scientist

From: Right-dead center
Insane since: Nov 2002

posted posted 10-18-2004 21:15

Ah, OK, I see what the does. Forces requests for that .jpg file to access a .php file instead. Nifty.

Although, what about past requests from referrer logs? That's what I'm really interested in.

:::11oh1:::

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 10-18-2004 21:23

Could you provide a short example of log file ?
Considering the generally huge size of log files, you'll certainly have to download them once a month and run a script locally to extract the infos you're looking after. Doing such script shouldn't be that hard.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 10-19-2004 04:13

I don't have anything technical to add here but I just have to say how COOL that pic is! Good job, krets!

: . . DHTML Slice Puzzle : . . .

silence
Maniac (V) Inmate

From: Melbourne, Australia
Insane since: Jan 2001

posted posted 10-19-2004 04:27

Poi is right about parsing the log files. It shouldn't be too hard, it just depends what format they're in. You could probably write a php script to parse the file and output the results over the web.

Nice image, btw. That's for one of the contests you enter, isn't it? I remember getting some nice links off your site when it was up in site reviews.

« BackwardsOnwards »

Show Forum Drop Down Menu