php求助。。。。。

@Ta 2013-04-11 9736点击
<?php
for ($i=1; $i>=-5; $i++)
{
file_get_contents("http://输入网址");
file_get_contents("http://文件所在的地址/index.php");
}
?>怎样做出个输入框。。是输入框的内容提交到输入网址那。
回复列表(10|隐藏机器人聊天)
  • @Ta / 2013-04-11 / /
    <?php
    /*
    *这好像一个网络任务啊
    */
    echo '<title>啊呀呀</title>';
    if($_POST['x'])
    {while(true)
    {file_get_contents('http://'.$_POST['x']);
    file_get_contents('http://文件所在的地址/index.php');
    }
    }echo '<form action="index.php" method="post">网址:<input type="text" name="x"/><input type="submit" value="提交"/></form>';
    ?>
  • @Ta / 2013-04-11 / /
  • @Ta / 2013-04-11 / /
    一楼代码有点缺陷,把
    file_get_contents('http://文件所在的地址/index.php');
    删除。
  • @Ta / 2013-04-11 / /
    或者这样
    <?php
    /*
    *这好像一个网络任务啊
    */
    echo '<title>啊呀呀</title>';
    if($_GET['x'])
    {file_get_contents('http://'.$_POST['x']);
    file_get_contents('http://文件所在的地址/index.php?x='.$_GET['x']);
    }echo '<form action="index.php" method="get">网址:<input type="text" name="x"/><input type="submit" value="提交"/></form>';
    ?>
  • @Ta / 2013-04-11 / /
    把楼下代码的POST改成GET,没改好
  • @Ta / 2013-04-11 / /
    这也是我想要的,拿走了
  • @Ta / 2013-04-11 / /
    @Xily  谢谢。。但是你改的没用了
  • @Ta / 2013-04-11 / /
    我用PHP练习测试结果出现404错误
    <?php 
    /*
    *这好像一个网络任务啊
    */
    echo '<title>一个提交表单</title>';
    if($_GET['x'])
    {
    file_get_contents('http://m.baidu.com'.$_GET['x']);
    file_get_contents('http://ymao.tk/tool/lianxi/lianxi/wap4435.php?x='.$_GET['x']);/*文件所在的地址*/
    }
    echo '<form action="wap4426.php" method="get">网址:<input type="text" name="x"/><input type="submit" value="提交"/></form>';
    ?>
  • @Ta / 2013-04-11 / /
    @Xily,能用PHP练习程序测试吗?出现404错误耶!
  • @Ta / 2014-09-17 / /
    @TabKey9@Xily,为啥还要判断?
添加新回复
回复需要登录