Php 如何从主页删除不需要的广告感知广告?

Php 如何从主页删除不需要的广告感知广告?,php,html,wordpress,ads,adsense,Php,Html,Wordpress,Ads,Adsense,我的一些观众报告说,在我的主页ww.shifter.pt的顶部看到了来自ad sense的无用广告 我已经更改了FTP访问密码、DB密码和网站所有用户的密码。重新启动服务器,但没有任何更改 广告中的代码如下所示,位于标题之前: <center><script async="" src="//www.google-analytics.com/analytics.js"></script><script async="" type="text/javascr

我的一些观众报告说,在我的主页ww.shifter.pt的顶部看到了来自ad sense的无用广告

我已经更改了FTP访问密码、DB密码和网站所有用户的密码。重新启动服务器,但没有任何更改

广告中的代码如下所示,位于标题之前:

<center><script async="" src="//www.google-analytics.com/analytics.js"></script><script async="" type="text/javascript" src="http://www.gstatic.com/pub-config/ca-pub-7837806915816060.js"></script><script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- de -->
<ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-7837806915816060" data-ad-slot="1724932034" data-adsbygoogle-status="done"><ins id="aswift_0_expand" style="display:inline-table;border:none;height:90px;margin:0;padding:0;position:relative;visibility:visible;width:728px;background-color:transparent"><ins id="aswift_0_anchor" style="display:block;border:none;height:90px;margin:0;padding:0;position:relative;visibility:visible;width:728px;background-color:transparent"><iframe width="728" height="90" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;"></iframe></ins></ins></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- uk -->
<ins class="adsbygoogle" style="display:inline-block;width:336px;height:280px" data-ad-client="ca-pub-7837806915816060" data-ad-slot="8650939636" data-adsbygoogle-status="done"><ins id="aswift_1_expand" style="display:inline-table;border:none;height:280px;margin:0;padding:0;position:relative;visibility:visible;width:336px;background-color:transparent"><ins id="aswift_1_anchor" style="display:block;border:none;height:280px;margin:0;padding:0;position:relative;visibility:visible;width:336px;background-color:transparent"><iframe width="336" height="280" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_1" name="aswift_1" style="left:0;position:absolute;top:0;"></iframe></ins></ins></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script> 
<br>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- US -->
<ins class="adsbygoogle" style="display:inline-block;width:320px;height:100px" data-ad-client="ca-pub-7837806915816060" data-ad-slot="1127672839" data-adsbygoogle-status="done"><ins id="aswift_2_expand" style="display:inline-table;border:none;height:100px;margin:0;padding:0;position:relative;visibility:visible;width:320px;background-color:transparent"><ins id="aswift_2_anchor" style="display:block;border:none;height:100px;margin:0;padding:0;position:relative;visibility:visible;width:320px;background-color:transparent"><iframe width="320" height="100" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_2" name="aswift_2" style="left:0;position:absolute;top:0;"></iframe></ins></ins></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script> </center>
谢谢你抽出时间

编辑


我已经能够阻止代码显示在该网站的桌面版本上,但问题仍然存在,例如,当你在Facebook应用程序浏览器上访问该网站时

您可能可以这样做:

$(document).ready(function(){
    $('.adsbygoogle').css('display','none');
});

但这并不是一个很好的解决方案,你可能应该联系谷歌,看看他们是否能解决这个问题。

这是我根据你的报告做出的99.9%的猜测:你的问题是你的托管提供商,他们试图通过在页面顶部插入广告来从托管网站中赚钱

虽然可能有一些笨拙的黑客可以用来消除它们,但我的猜测是,你可以通过某种方式使用JavaScript遍历DOM并删除DOM节点,假设你对内容有那么多的控制权,出于堆栈溢出的目的,我的答案是:找一个不同的托管提供商。您甚至可能已经签署了一份协议,允许他们以这种方式添加广告,在这种情况下,将其删除可能会违反其托管条款。无论如何,允许主机提供商在页面顶部插入广告——我希望——是一种非常不寻常的方式,因此应该很容易找到一种机制来避免这种情况


不幸的是,关于将谁用作主机或如何查找主机的讨论超出了堆栈溢出的范围。

而您的页面中没有包含任何此类代码?我感到困惑。你是说你的页面上有你没有放置的adsense广告吗?@DavidP.Caldwell没有,我们在网站其他位置的不同横幅上有广告意识,但不在顶部。你能给我们更多的细节吗?你的问题太广泛了,除了在黑暗中猜测之外,你什么都做不了。@LajosArpad请帮助我了解我可以用哪种方式更具体?我应该在哪里粘贴?你的解决方案在网站的桌面版本上解决了问题,但如果从Facebook应用程序浏览器访问网站,它仍然会显示adsView,并在手机中查看它,让学生在那里使用。谷歌可能对移动ADS使用了不同的分类。我真的怀疑,因为服务器提供商是我的朋友:在你提出另一种解释之前,我坚持我的理论。代码不只是在页面中结束。