Individual Entry

About

Thoughts on language, and other miscellaneous things, by Daniel "sRc" Cheney, formerly known as "The Anaconda". Also various writings.

All original site content copyright Daniel Cheney. Other characters, works, or other information referred to are held by their respective copyright holders and used under the good faith of Fair Use.

Powered by PivotX - 2.3.0
XML: RSS Feed
XML: Atom Feed
Valid XHTML 1.0 Transitional
Valid CSS
template by i-marco's choice

Unbalanced Load

I started using Google Analytics a while back to track visit information for this site, because my server logs and AdSense report very different things. And Analytics doesn't report anywhere close to the amount of traffic, either. Where Analyitics may say I only get 15 page views in a day, AWStats will show I've at least 100. It's never made sense, so I decided to make a little tracker of my own. A simple PHP script I added to the end of all my templates for a couple days, to just record a few peices of information. And when I checked them, I found a lot of those 100 hits were various search engine bots, some more were spambots that are filtered, leaving relatively few of them actual people.

Since I'm all about the sharing of code snippets, here's the code for the script. It's removed now.

<?
$namefile = "../../log.asw";
$fn = fopen($namefile, 'a');
$ip = getenv('REMOTE_ADDR');
$name = substr($_SERVER["SCRIPT_NAME"],
strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
$curdate = date("m\-d\-Y");
$fullname = $ip . ">" . $curdate . ">" . $name . "\r\n";
fwrite($fn, $fullname);
fclose($fn);
?>

Used tags: , ,
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Facebook
  • Twitter




(optional field)
(optional field)
Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.

Meta Information:

Title: Unbalanced Load
Date posted: 08 10 09 - 23:13
Next entry:   » Power Ballad
Previous entry: « The Green House

Frontpage

Content

Regular Spelling
Main pages of Regular Spelling. 'All Pages' contains links to all the short stories hosted on the site.

Search