要求:
    根据不同表单数据提交方式(get,post,其它提交方式忽略)模拟数据提交,能保存cookie,提交后获取返回相关Content功能领域:
    模拟浏览器(机器人)操作,投票,发帖,注册等等相关基于http协议数据提交请求(暂不考虑有验证码的环境下进行数据提交)
Class Header{
$submittype;   //提交数据的类型(post get 以及其它)
$request_url;  //提交数据的url
$host = "Host www.web.com";  //主域
$user_agent = "User-Agent Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0";//浏览器类型
$accept = "Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
$accept_language = "Accept-Language zh-cn,zh;q=0.5";
$accept_encoding = "Accept-Encoding gzip, deflate";
$accept_charset = "Accept-Charset GB2312,utf-8;q=0.7,*;q=0.7";//编码
$keep_alive = "Keep-Alive 115";
$connection = "Connection keep-alive";
$referer = "Referer http://www.web.com/submitdata/notebook.htm";//来源地址
$cookie = " 获取当前cookie";
$content_type = "Content-Type application/x-www-form-urlencoded";
$content_length = "提交数据的长度count()";
...get() set();
}function submitData($header机器人 ... ...){
//要求登录的需要能保存cookie,以便第二次进行数据提交
//提交数据采用键值对数组封装遍历
return $content;
}有现成程序的PHPer们,可否发至我邮箱?
[email protected]
刚入手PHP,一些函数库不熟悉,请好心的phper帮帮忙 一起探讨,一起研究:)