POST用户名和密码然后再取页面信息
这样行不

解决方案 »

  1.   

    看看手册上的例子吧
    例子 2. Making a POST request to an https server<?php
    /* Send POST request to https://secure.example.com/form_action.php
    * Include form elements named "foo" and "bar" with dummy values
    */$sock = fsockopen("ssl://secure.example.com", 443, $errno, $errstr, 30);
    if (!$sock) die("$errstr ($errno)\n");$data = "foo=" . urlencode("Value for Foo") . "&bar=" . urlencode("Value for Bar");fputs($sock, "POST /form_action.php HTTP/1.0\r\n");
    fputs($sock, "Host: secure.example.com\r\n");
    fputs($sock, "Content-type: application/x-www-form-urlencoded\r\n");
    fputs($sock, "Content-length: " . strlen($data) . "\r\n");
    fputs($sock, "Accept: */*\r\n");
    fputs($sock, "\r\n");
    fputs($sock, "$data\r\n");
    fputs($sock, "\r\n");$headers = "";
    while ($str = trim(fgets($sock, 4096)))
      $headers .= "$str\n";echo "\n";$body = "";
    while (!feof($sock))
      $body .= fgets($sock, 4096);fclose($sock);
    ?>  
      

  2.   

    to ruiinfo(ruiinfo)
    按你的我试着做了
    $data = curl_exec ($ch);
    打印出$data的时候显示的就是那个登陆页面
    $d = curl_getinfo($ch);
    打印$d是个信息数组,不过不知道如何判断我是否登陆了,另外如何继续使用登陆后的信息,可以转到信息页面去取信息呢?to ice_berg16(寻梦的稻草人) 
    按你的例子运行时提示下面的错误了
    Warning: fsockopen(): no SSL support in this build in d:\appserv\www\fb\tttt.php on line 7
    Warning: fsockopen(): unable to connect to www.pointbet.com:443 in d:\appserv\www\fb\tttt.php on line 7
    操作成功完成。 (0) 
    line 7是
    $sock = fsockopen("ssl://".$host, 443, $errno, $errstr, 30);
    这个是什么意思啊?ssl换成https也不行:(
      

  3.   

    to ruiinfo(ruiinfo)
    原来是偶搞错了,把页面填成了那个登陆的页面,填了检查用户密码的就ok了:)
    可是如何继续使用登陆后的注册信息,然后转到信息页面去取信息呢?