lyhiving / snoopy
snoopy php class
Installs: 1 672
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2024-11-15 19:17:10 UTC
README
snoopy php class
GET
$snoopy = new \Snoopy\Snoopy();
$snoopy->fetch($url); //获取所有内容
echo $snoopy->results; //显示结果
//可选以下
$snoopy->fetchtext //获取文本内容(去掉html代码)
$snoopy->fetchlinks //获取链接
$snoopy->fetchform //获取表单
POST
$snoopy = new \Snoopy\Snoopy();
$data["username"] = "admin";
$data["pwd"] = "admin";
$snoopy->submit($url,$data);//$data为提交的数组
echo $snoopy->results; //获取表单提交后的 返回的结果