zoukankan      html  css  js  c++  java
  • 生成新站点

    <?php 
     

    if($_POST){
        $r=range(100, 999);
        shuffle($r);

        $r1=$r[0];
        $r1=$_POST['do'];
        $do_more=$_POST['do_more']?$_POST['do_more']:'';
        $r11=$r1;
        $web="www.".$r1.".com";
        $web2="http://www.".$r1.".com";
        // var_dump($r);die;
        $str2="127.0.0.1        ".$web." ";
        $file = 'C:WindowsSystem32driversetchosts';
        $file2 = 'D:wampinapacheapache2.4.9confextrahttpd-vhosts.conf';
        // $file2 = 'D:AppServApache24confextrahttpd-vhosts.conf';
        file_put_contents($file, $str2, FILE_APPEND);
        if($_POST['do_more']){
            $r11=$r1."\".$do_more;
        }


        $str = file_get_contents($file);
        


        $str3="<VirtualHost *:80> ";
          $str3.="  DocumentRoot "D:\admin\".$r11."" ";
          $str3.="  ServerName www.".$r1.".com ";
          $str3.="  ServerAlias www.".$r1.".com ";
          $str3.="  <Directory "D:admin\".$r11.""> ";
          $str3.="   Options FollowSymLinks ExecCGI ";
          $str3.="   AllowOverride All ";
          $str3.="   Order allow,deny ";
          $str3.="   Allow from all ";
          $str3.="   Require all granted ";
          $str3.=" </Directory> ";
          
          $str3.="</VirtualHost> ";

          
         
        file_put_contents($file2, $str3, FILE_APPEND);
        $res = file_get_contents($file2);
        echo "<a href='".$web2."'>$web2</a>";echo "<a href='javascript:history.go(-1);'>    返回</a>";
        // echo $res;
     }
    /*
    最简单的爬网页程序
    */
    ?>
    <html lang="zh" dir="ltr">

    <head>

      <meta charset="utf-8">
      <meta name="google" value="notranslate">
      <meta name="referrer" content="strict-origin">
    </head>
    <body>
        <div style="980px; margin:0 auto">
            <form action="" method="post">


            <table border=1>
                
                    <td>domain</td><td><input type="text" name='do'/></td><td><input type="text" name='do_more'/></td><td><input type="submit" name='submit'/></td>
                    
            </table>
            </form>
        </div>

    </body>
    </html>

  • 相关阅读:
    前端时间格式化
    Navicat for Oracle
    在JSP中使用Session
    在JSP中使用MD5
    QTP的那些事用QTP测试Web上的Ajax
    VBS函数应用getobject的使用获得Automation对象
    QTP的那些事Excel导入QC没反应的解决方法
    QTP的那些事QC远程执行QTP经常出现QTP崩溃现象解决方案
    QTP的那些事自动化的个人体会感悟(转)
    QC在win7远程执行QTP脚本excel不能读取,及其其他win7问题解决方案(图解转)
  • 原文地址:https://www.cnblogs.com/csjoz/p/15201762.html
Copyright © 2011-2022 走看看