lyhiving / snoopy
snoopy php class
Installs: 1 678
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-12-15 19:35:45 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; //获取表单提交后的 返回的结果