$url = \"要丟的url\";
  
        $curl = curl_init($url);
  
$post_data[\'langx\']=\"zh-tw\";
  
$post_data[\'end\']=\"\";
  
$post_data[\'Submit2\']=\"確定\";
  
$post_data[\'Uid\']=\"001\";
  
$post_data[\'username\'] =\"登入帳號\";
  
$post_data[\'password\'] \"登入密碼\";
  
//print_r($post_data);print_r($_POST);exit;
  
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); //一定要有
  
            //post資料給指定網頁
  
            curl_setopt($curl, CURLOPT_POST, 1); //決定用 GET or POST 
  
            curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
  
            
  
            if (curl_errno($curl)) {
  
                $this->_error = curl_error($curl);
  
            }
  
            $Result = curl_exec($curl);
  
            curl_close($curl);
  
  
  
  
基本上就是照著 html code paser 
  
http://phorum.study-area.org/index.php/topic,45874.0.html  
 
http://blog.longwin.com.tw/2008/05/php_get_login_cookie_2008/ 
 
  |