Notice: The following tutorial is not to be used in ways that are against the law. It only demonstrates a problem that can be caused by the way blogger.com uses profile images. A similar technique is used by many ad services.
Suppose you want more info on the traffic, or even trying to find out the real identity of a blogger who maintains a blog at blogger.com -or even their visitors. How can you do this? Here is a simple step-by-step recipe....
What you need (other ingredients can be used too, this is just an example): 1 server running PHP + MySQL 1 blogger.com account
- Choose the jpeg image you will use for your blogger.com profile "photo" (preferably one not bigger than 64x64). Let's say photo.jpg
- Upload this photo at your server. Let's say the address is http://myserver/mydir/photo.jpg
- Create the following table at your MySQL db:
- Create the following php script, and upload it as http://myserver/mydir/photo.php
create table blogger_stats(dt timestamp, ip varchar(27),
page varchar(255), agent varchar(255)) ;
- If there is not a .htaccess file in this directory, create an empty one.
- put the following lines in this .htaccess file:
require_once 'DB.php' ;
$DSN = "mysql://dbuser:dbpass@localhost/dbname";
$bit_db = DB::connect($DSN);
$res=$bit_db->query("INSERT INTO blogger_stats(ip, page, agent)
header ('Content-Length: ' . filesize('./photo.jpg') ) ;
header('Content-Type: image/jpeg') ;
- Now use http://myserver/mydir/photo.jpg as your photo in your blogger.com profile.
RewriteRule ^photo.jpg photo.php
You are ready!
Just put a comment in any post you want to "keep an eye". Every time someone visits the comments page, you will have a new entry in the blogger_stats table. Actually this is a nice way to keep your blog's stats too (this is how it started for me)!