update README

This commit is contained in:
JAE
2015-02-01 16:13:48 +08:00
parent 93b7ca0b7d
commit 39c06446ca

View File

@@ -1,26 +1 @@
#QueryList交流社区: [http://ql.44i.cc/](http://ql.44i.cc/) #QueryList交流社区: [http://ql.44i.cc/](http://ql.44i.cc/)
#QueryList交流QQ群:123266961 <a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=a1b248ae30b3f711bdab4f799df839300dc7fed54331177035efa0513da027f6"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="╰☆邪恶 魔方☆" title="╰☆邪恶 魔方☆"></a>
#QueryList简介
***
QueryList是一个基于phpQuery的通用列表采集类,是一个简单、 灵活、强大的采集工具,采集任何复杂的页面 基本上就一句话就能搞定了。
#QueryList 使用
```php
//获取采集对象
$hj = QueryList::Query('http://www.baidu.com/s?wd=jaekj',array('title'=>array('h3','text')));
//输出结果:二维关联数组
print_r($hj->jsonArr);
//输出结果JSON数据
echo $hj->getJSON();
```
上面的代码实现的功能是采集百度搜索结果页面的所有搜索结果的标题,然后分别以数组和JSON格式输出。
###QueryList 静态方法Query原型
>***Query***($page,$regArr,$regRange='',$getHtmlWay="curl",$output_encoding=false)
一共有五个参数,后面三个参数是可选的
>$page
>>类型: **string**
>>说明: **必选参数要抓取的网页URL地址(支持https)或者是html源代码这意味着你可以直接传一个网址给QueryList也可以将通过自己的方式获取到的并经过你自己处理过的HTML源码传给QueryList**