perl语言有 一个类浏览器模块,从welcome 页面登陆,可以到达这里,但php我
始终找不到方法,到网上搜索一阵子,到有登陆www.paypal.com网站的例子,但不能用
<?
  $cookie = "KHcl0EuY7AKSMgfvHl7J5E7hPtK
wzZ6u0svpYQR8vS-7W_IGXrOzwKA1NvhPQcUTRSRroIDX0lDEoz6WEIYRKRfMM8Z_0FK-OSOtr7LwBiB
paypal.com/
0
2362813056
31023814
2569692016
29555304
*
cookie_check
yes
paypal.com/
0
3574737536
30289559
2569792016
29555304
*";
 include("cookie.php");
# script by Joel De Gan
# http://listbid.com
echo $cookie;
function GetCurlPage ($pageSpec) {//$agent = "up.b";
//$agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
$agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
$header[] = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*";
$ch = curl_init($pageSpec);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1); ########### debug
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
$tmp = curl_exec ($ch);
curl_close ($ch);
return $tmp;
}
function PostCurlPage ($pageSpec, $data)
{
   $agent = "up.b";
   $header[] = "Accept: text/vnd.wap.wml,*.*";
   $ch = curl_init($pageSpec);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt($ch, CURLOPT_VERBOSE, 1); ########### debug
   curl_setopt($ch, CURLOPT_USERAGENT, $agent);
   curl_setopt ($ch, CURLOPT_HTTPHEADER, $header);
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
   curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
   curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
   $tmp = curl_exec ($ch);
   curl_close ($ch);
   return $tmp;
}
//$first = GetCurlPage("https://www.paypal.com/cgi-bin/phscr?cmd=login");
$first = GetCurlPage("www.paypal.com/cgi-bin/webscr?cmd=_login-run");
echo $first;
//$exp = explode("=", $first);
//$id = explode("\"", $exp[16]);
//$second = PostCurlPage("https://www.paypal.com/cgi-bin/phscr?rs=".$id[0], "[email protected]&pass=YOUR_PP_PASS&cmd=login-submit-pass");
//echo $second."\n\n";
?>