Forum Moderators: martinibuster
I get over 100 clicks of the same IP on the same ad within one minute!
Thank god that I'm running a logging script, and that I can take immediate action like blocking the IP and emailing AdSense about this!
Anyone else here who get this kind of "attacks"?
Noel
Well the good part of this is that Google isn't suspending your account over something you cannot control!
Yeah.. But still I've email google about this everytime, and they thanked me for reporting it :-)
Noel,
How do you track the ip's hitting your adsense ads?
Some time ago there was a nice script posted here to do things like this.
I can't find the post about this anymore.
Noel
<script>
function hit(){
window.focus();
if (window.status){
img = new Image();
img.src = 'tracking.php?ref=' + escape(document.location) + ' ¦ ' + escape(window.status);
};
};
document.getElementById("google_ads_frame").onfocus = hit;
</script>
And here's the code for the php file. It will save the log to a text file
<?
if($ref) {
if (getenv(HTTP_CLIENT_IP)){
$ip=getenv(HTTP_CLIENT_IP);
}
else {
$ip=getenv(REMOTE_ADDR);
}
$time = date("F-d ¦ h:i:s A");
$log= "$time ¦ $ip ¦ $ref\n";
$data=file("track.txt");
$num=count($data);
$fp=fopen("track.txt","w");
flock($fp,LOCK_EX);
fputs($fp,$log);
for ($i=0;$i<$num;$i++){
fputs($fp,$data[$i]);
}
fclose($fp);
}
?>