V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
zc2110340
V2EX  ›  PHP

网上找了个域名停放的 php 代码,无奈不会 php,,,求大神帮忙看看,为什么老是会弹出一个网页 求大神帮忙 把这个段弹窗代码去掉

  •  
  •   zc2110340 · 2016-01-14 16:30:52 +08:00 · 3449 次点击
    这是一个创建于 3270 天前的主题,其中的信息可能已经有所发展或是发生改变。
    <?php
    $url=$_SERVER['SERVER_NAME'];
    if(strpos($url,'bailb.com')!== false)$key='百乐宝';
    if(strpos($url,'yanglele.com')!== false)$key='杨乐乐';

    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><?php echo $key; ?> - <?php echo $url; ?> - The Domain For Sale,此域名出售!</title>
    <meta name="keywords" content="<?php echo $key; ?>" />
    <meta name="description" content="<?php echo $key; ?>" />
    <style type="text/css">
    <!--
    BODY {
    MARGIN: 0px;
    font-size: 12px;
    }
    td {
    font-size: 12px;
    }
    .l1 {
    FONT-WEIGHT: bold; FONT-SIZE: 18px
    }
    -->
    </style>

    <script type="text/javascript">
    function GetCookie(sName)
    {
    var aCookie = document.cookie.split("; ");
    for (var i=0; i < aCookie.length; i++)
    {
    var aCrumb = aCookie[i].split("=");
    if (sName == aCrumb[0])
    return unescape(aCrumb[1]);
    }
    return null;
    }
    function SetCookie(sName, sValue,date)
    {
    document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString()+";path=/";
    }


    banner4_iframe=null;
    date = new Date();
    date.setDate(date.getDate()+1);
    if(GetCookie("ispop")==null){
    SetCookie("ispop","0",date);
    }
    if(GetCookie("ispop")=="0"){
    //ispop=0;
    banner4_iframe=window.open('http://www.2345.com/?kzc3821/','_blank');
    if(banner4_iframe!=null)SetCookie("ispop","1",date);
    }
    </script>

    </head>

    <body bgcolor="#636563" onclick="if(banner4_iframe==null&&GetCookie('ispop')=='0')banner4_iframe=;if(banner4_iframe!=null)SetCookie('ispop','1',date);">
    <br />
    <br />
    <table width="720" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
    <tr>
    <td colspan="5" align="center" class="l1">This domain is for sale</td>
    </tr>
    <tr>
    <td width="15" height="189">&nbsp;</td>
    <td width="297" height="189"><img src="images/sale.gif" width="297" height="188" /></td>
    <td width="1" height="189">&nbsp;</td>
    <td rowspan="2" bgcolor="#CECF31"><table width="96%" align="center" cellpadding="1" cellspacing="1">
    <SCRIPT language=javascript>
    <!--

    function fucCheckTEL(TEL)
    {
    var i,j,strTemp;
    strTemp="0123456789-()# ";
    for (i=0;i<TEL.length;i++)
    {
    j=strTemp.indexOf(TEL.charAt(i));
    if (j==-1)
    {
    //说明有字符不合法
    return 0;
    }
    }
    //说明合法
    return 1;
    }

    function fucCheckPrice(bidding)
    {
    var i,j,strTemp;
    strTemp="0123456789";
    for (i=0;i<bidding.length;i++)
    {
    j=strTemp.indexOf(bidding.charAt(i));
    if (j==-1)
    {

    //说明有字符不合法
    return 0;
    }
    }
    //说明合法
    return 1;
    }


    function Open_NewWindow(URL)
    {
    var objNewWin;
    objNewWin = window.open(URL,"","fullscreen=0,toolbar=0,location=no,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,width=400,height=400,top=160,left=324");
    objNewWin.focus();
    }

    function CheckData()
    {
    var MyForm=document.getElementById('MyForm');
    if (MyForm.my_domain.value == "")
    {
    window.alert("请填写您预定的域名!");
    return false;
    }
    else if (MyForm.my_bidding.value == "")
    {
    window.alert("请正确填写您的出价");
    return false;
    }
    else if (fucCheckPrice(MyForm.my_bidding.value) == 0)
    {
    window.alert("请正确填写您的出价");
    return false;
    }
    else if (MyForm.my_name.value == "")
    {
    window.alert("请填写称呼");
    return false;
    }
    else if (MyForm.my_email.value == "")
    {
    window.alert("请填写电子邮件");
    return false;
    }
    else if(MyForm.my_email.value.indexOf("@")=="-1"){
    window.alert("请正确填写电子邮件");
    return false;
    }
    else//通过所有检查
    MyForm.submit();
    }

    -->
    </SCRIPT>
    <form name="MyForm" id="MyForm" action="mail.php" method="post">
    <tr>
    <td height="40"><strong><?php echo $url; ?></strong><br />
    <?php echo $key; ?></td>
    </tr>
    <tr>
    <td><strong>本域名转让或合作</strong><br />
    This domain is for sale!</td>
    </tr>
    <tr>
    <td>竞价域名: &nbsp;
    <input id="my_domain" readonly value="<?php echo $url; ?>" name="my_domain" /> </td>
    </tr>
    <tr>
    <td>您的出价: &nbsp;
    <input id="my_bidding"
    maxlength="6" name="my_bidding" />
    <select id="my_bid"
    name="my_bid">
    <option value="RMB" selected="selected">人民币</option>
    <option value="USD">USD</option>
    </select></td>
    </tr>
    <tr>
    <td>您的称呼: &nbsp;
    <input id="my_name"
    maxlength="30" name="my_name" /></td>
    </tr>
    <tr>
    <td>您的 Email:&nbsp;
    <input id="my_email"
    maxlength="30" name="my_email" /></td>
    </tr>
    <tr>
    <td>您的单位: &nbsp;
    <input id="my_company"
    maxlength="30" name="my_company" /></td>
    </tr>
    <tr>
    <td>联系电话: &nbsp;
    <input id="my_tel"
    maxlength="20" name="my_tel" /></td>
    </tr>
    <tr>
    <td>QQ / MSN: &nbsp;
    <input id="my_qq"
    maxlength="25" name="my_qq" />
    <div></div></td>
    </tr>
    <tr>
    <td><textarea id="my_message" name="my_message" rows="3" cols="35">如果需要,请在此留言。
    例如:说明您需要此域名的理由,以表明您确有诚意购买此域名。</textarea> </td>
    </tr>
    <tr>
    <td><INPUT onclick=CheckData() type=button value=提交丨 Submit name=button>
    点击(提交)后可能有延迟,请稍候... </td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td><img src="images/contact.gif" /> <a target=blank href="tencent://message/?uin=285863821&Site=domain&Menu=yes"><img border="0" src="images/6_online.gif" alt="在线 QQ 交谈"></a></td>
    </tr>
    </form>
    </table></td>
    <td width="15" height="189">&nbsp;</td>
    </tr>
    <tr>
    <td width="15" height="200">&nbsp;</td>
    <td width="297" height="200" valign="top" background="images/domain.gif" align="right"><br />
    <br />
    <font color="#FFFFFF">Good domain,good chance!</font>  </td>
    <td width="1" height="200">&nbsp;</td>
    <td width="15" height="200">&nbsp;</td>
    </tr>
    <tr>
    <td height="60" colspan="2" align="center">精明的您也许比我们更能意识到一个好<B><FONT
    color=#ff6600>域名</FONT></B>的实际价值!<BR>
    (Smart you can aware the
    real value of <BR>
    a good domain name more than we.)</td>
    <td width="1">&nbsp;</td>
    <td align="center"><MARQUEE scrollDelay=200 behavior=alternate>慧眼识金,洞察潜能,抢先购买,成就未来!</MARQUEE></td>
    <td width="10">&nbsp;</td>
    </tr>
    <tr>
    <td height="1" colspan="5" align="center" bgcolor="#999999"></td>
    </tr>
    <tr>
    <td height="60" colspan="5" align="center">Powered by <a href="http://www.flashack.com" target="_blank">flashack</a></td>
    </tr>
    </table>

    <script language="javascript" type="text/javascript" src="http://js.users.51.la/2060053.js"></script>
    <noscript><a href="http://www.51.la/?2060053" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/2060053.asp" style="border:none" /></a></noscript>
    </body>
    </html>
    8 条回复    2016-01-30 19:55:13 +08:00
    jkjoke
        1
    jkjoke  
       2016-01-14 16:34:19 +08:00
    <head> 里面的那段<script></script>全删了
    zc2110340
        2
    zc2110340  
    OP
       2016-01-14 16:37:37 +08:00
    @jkjoke 这一段?
    <script type="text/javascript">
    function GetCookie(sName)
    {
    var aCookie = document.cookie.split("; ");
    for (var i=0; i < aCookie.length; i++)
    {
    var aCrumb = aCookie[i].split("=");
    if (sName == aCrumb[0])
    return unescape(aCrumb[1]);
    }
    return null;
    }
    function SetCookie(sName, sValue,date)
    {
    document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString()+";path=/";
    }


    banner4_iframe=null;
    date = new Date();
    date.setDate(date.getDate()+1);
    if(GetCookie("ispop")==null){
    SetCookie("ispop","0",date);
    }
    if(GetCookie("ispop")=="0"){
    //ispop=0;
    banner4_iframe=window.open('http://www.2345.com/?kzc3821/','_blank');
    if(banner4_iframe!=null)SetCookie("ispop","1",date);
    }
    </script>
    jkjoke
        3
    jkjoke  
       2016-01-14 16:40:04 +08:00   ❤️ 1
    @zc2110340 对,大概内容就是判断弹窗了没

    还有这里面

    <body bgcolor="#636563" onclick="if(banner4_iframe==null&&GetCookie('ispop')=='0')banner4_iframe=;if(banner4_iframe!=null)SetCookie('ispop','1',date);">
    <br />

    也要删掉:
    onclick="if(banner4_iframe==null&&GetCookie('ispop')=='0')banner4_iframe=;if(banner4_iframe!=null)SetCookie('ispop','1',date)
    zc2110340
        4
    zc2110340  
    OP
       2016-01-14 16:42:58 +08:00
    @jkjoke 哦哦,谢谢 我试试
    aitaii
        5
    aitaii  
       2016-01-14 22:39:50 +08:00
    @zc2110340 可以发一下整个代码吗?
    a308057848
        6
    a308057848  
       2016-01-15 09:39:04 +08:00
    关 PHP 毛事~
    WilliamwAn
        7
    WilliamwAn  
       2016-01-20 10:51:20 +08:00
    js 控制的 跟 php 没关系吧
    myleon
        8
    myleon  
       2016-01-30 19:55:13 +08:00
    我能说和 php 有毛关系吗?伸手党同志
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2878 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 08:13 · PVG 16:13 · LAX 00:13 · JFK 03:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.