http://www.jb51.net/article/14181.htm
代码如下:
<?php
include "Snoopy.class.php";
$snoopy = new Snoopy;
$snoopy->fetchform("http://www.phpx.com/happy/logging.php?action=login");
print $snoopy->results;
< ?php
include "Snoopy.class.php";
$snoopy = new Snoopy;
$submit_url = "http://www.phpx.com/happy/logging.php?action=login";
$submit_vars["loginmode"] = "normal";
$submit_vars["styleid"] = "1";
$submit_vars["cookietime"] = "315360000";
$submit_vars["loginfield"] = "username";
$submit_vars["username"] = "********"; //你的用户名
$submit_vars["password"] = "*******"; //你的密码
$submit_vars["questionid"] = "0";
$submit_vars["answer"] = "";
$submit_vars["loginsubmit"] = "提 交";
$snoopy->submit($submit_url,$submit_vars);
print $snoopy->results;
?>