dsbc80836 2009-08-25 13:44
浏览 56
已采纳

谷歌adsense使用PHP吗?

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\">
</script>");
}
?>
  • 写回答

2条回答 默认 最新

  • douhong6187 2009-08-25 13:45
    关注

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料