当前位置:首页 > 开发 > 互联网 > 正文

模拟灌水机器人

发表于: 2014-06-19   作者:风起云涌57   来源:转载   浏览:
摘要: /* Host tencent.com User_Agent Mozilla/5.0 (windows;U; windows NT 6.1 ;ZH-CN;rv:1.9.2.13 Accept text/html,application/xhtml+xml,application/xml Accept-Language zh-ch,zh;q=0.5 Accept-Encoding gzip
/*
Host tencent.com
User_Agent Mozilla/5.0 (windows;U; windows NT 6.1 ;ZH-CN;rv:1.9.2.13
Accept text/html,application/xhtml+xml,application/xml
Accept-Language zh-ch,zh;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset GB2312,utf-8
Keep-Alive 115
Connection keep-alive
Referer http://***.com
Cookie ****************************
*/

<?php
$data =array('author'=> '熊猫大侠','email'=> 'xm@yaohoo.com', 'text'=> '来灌水,无人能挡');
$data = http_bulid_query($data);
$opts = array(

'http' = >array(
'method' => 'Post',
'header' => 'Content-type:application/x-www.form-urlencoded\r\n' ,
'Content-lengtn:' .strlen($data)."\r\n",
'Cookie:PHPSESSID=15TUO632GKS876'.'\r\n'
'User-Agent: Mozilla/5.0 (windows;U; windows NT 6.1 ;ZH-CN;rv:1.9.2.13',
'Referer: http://yahoo.com/content/7/index.php'.'\r\n',
'content' => $data
)
);


$context = stream_context_create($opts);
$html = @file_get_contents("http://yahoo.com/content/7/index.php/comment",false,$content);
?>

模拟灌水机器人

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号