tags:

views:

117

answers:

2

I found the code below on a website where a google adsense ad usually shows up at, it was in the box the size of a google add, I am curious if this was from google themself or if the site owner used this code? I can't provide a URL as it was a 1 time thing, or randomly happens.

<?php
if (isset($_GET["client"]) && 
    isset($_GET["slot"]) &&
    isset($_GET["width"]) &&
    isset($_GET["height"]))
{
print("<script type=\"text/javascript\"><!--
google_ad_client = \"".$_GET["client"]."\";
google_ad_slot = \"".$_GET["slot"]."\";
google_ad_width = ".$_GET["width"].";
google_ad_height = ".$_GET["height"].";
");
if (isset($_COOKIE["k"])) {
  $k = preg_replace("/[^-.]*-25-[^-._]*[._]/","",$_COOKIE["k"]);
  $k = preg_replace("/[^-.]*-40-[^-._]*[._]/","",$k);
  $k = preg_replace("/-.*/","",$k);
  $k = preg_replace("/,.*/","",$k);
  print("google_page_url = \"http://insurance.webhop.biz/insurance.php?k=".$k."\";
");
} elseif (isset($_GET["k"])) {
  print("google_page_url = \"http://insurance.webhop.biz/insurance.php?k=".$_GET["k"]."\";
");
}
print("//-->
</script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"&gt;
</script>");
}
?>
+5  A: 

The only code Google provide for AdSense is a fragment of HTML that loads their JavaScript.

David Dorward
after following the link in the code above, I am thinking maybe the site owner tricks adsense into thinking it is an insurance site to show those kind of ads
jasondavis
+2  A: 

That's the site's code for displaying a Google AdSense unit. It's not provided by Google. All it does is print out the Google AdSense JavaScript code.

ceejayoz