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条)

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大