标记。
只知道Apchache要启动https服务。
form 提交到 https://url行不行?

解决方案 »

  1.   

    我在网上找了几个类是的登陆程序,可是浏览器没有任何反映,
    我不知道是不是能用,我必须要登陆进去才行
    <?
    # script by Joel De Gan
    # http://listbid.comfunction 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, "cook");
    curl_setopt($ch, CURLOPT_COOKIEFILE, "cook");
    $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, "cook");
       curl_setopt($ch, CURLOPT_COOKIEFILE, "cook");
       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("https://www.paypal.com");
    $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";
    ?>
      

  2.   

    你在传递COOKIE时标记secure参数了吗?int SetCookie(string name, string value, int expire, string path, string domain, int secure); 
    除了name之外所有的参数都是可选的。value,path,domain三个参数可以用空字符串代换,表示没有设置;expire 和 secure两个参数是数值型的,可以用0表示。expire参数是一个标准的Unix时间标记,可以用time()或mktime()函数取得,以秒为单位。secure参数表示这个Cookie是否通过加密的HTTPS协议在网络上传输。