Forum Moderators: DixonJones

Message Too Old, No Replies

Quick and dirty script-why has no one thought of this?

         

heretic

6:32 am on Oct 10, 2002 (gmt 0)

10+ Year Member



Years ago, when I used to have time to script, I wrote one that goes through the log file, which at my host was one day per log file, and email myself the log...all the referrers were html-ized, which meant I can just click on my email and then see which page referred me. But it got unwieldy and I never properly fixed it up. I would think everyone would love a quick and dirty perl script that:

1. At midnight, analyzed the latest logfile for only the last day's data and then:
2. Removing all referrers that you list are your own domains, variations thereof, IPs...i.e. 1 domain parked on another, 2 domains you use to link to each other...all this configurable in a cfg file
3. Doing dns lookups on ips and converting to domain names
4. combining identical urls that have www.domainname.com w/ domainname.com
5. having each line read something like this:


1. [google.com...] (101 visits)
2. [webmasterworld.com...] (92 visits)
3. [webmasterworl.com...] (54 visits)
etc..

It would make tracking your links way easier...

Does anyone know of a script like this?

amoore

7:19 am on Oct 10, 2002 (gmt 0)

10+ Year Member



I have one that does a lot of stuff like that. It depends on your logs being written to a database, though, which I doubt most people do. I shows me most common referrers, most hit pages, most used browsers, pages which result in the most traffic, 404 errors, and all kinds of stuff.

If you want something like this or what you've described written for you, [sticky¦e]mail me and I'm sure I can help you out.

Sebastian

9:03 pm on Oct 10, 2002 (gmt 0)

10+ Year Member



heretic

Yeah, I wrote one myself for that very reason. Nice thing to have.

heretic

11:29 am on Oct 12, 2002 (gmt 0)

10+ Year Member



Well, I finally did some research into this. My log file is kept since September 30 and is 1 gig big! Just processing this file will take a lot out of the server which I'm not excited about. And w/ cpanel (mis)handling their log rotation, I will not take the risk of rotating them in a method not supported by their system.

w/ PHP so easy, I haven't looked at perl code in a couple years...I think just reading that 1 gig file would result in opening a tmp file of equal size? I'd rather not do that...I wish there was a way to pull out only the latest day, get list of referers and that's it.

If you think your code could help, I'd be most appreciative if you don't mind sharing it. I guess I wouldn't want to log it to mysql. I don't have that much space on my server.

heretic

11:06 am on Oct 13, 2002 (gmt 0)

10+ Year Member



OK, I tried a bunch of solution but none of them worked..

If someone knows of a tool that does the following, I'd be most appreciative:

I'm finally looking for is a tool similar to [extremetracking.com...] where you put an invisible gif in whatever pages you want to track, and I only want to see referers (browser types and search engine keywords would be bonus, but not primary). And I'd like it to keep only 1 day of traffic, emailing me the results once a day. If I can view the one day stats on the web too, that would be gravy.

If anyone knows a package like this, please do tell! Thanks.

martin

11:01 am on Oct 14, 2002 (gmt 0)

10+ Year Member



>If you want something like this or what you've described written for you, [sticky¦e]mail me and I'm sure I can help you out.

In what language is it? I would really like it if it's PHP.