模擬登陸的步驟: $url ='你的登陸頁面'; $user_login=''; $user_password=''; $loginfields = "user_login=$user_login&user_password=$user_password"; $ch = curl_init(); curl_setopt($ch, CURLOPT_POST, 0); //set how many paramaters to post curl_setopt($ch, CURLOPT_URL,$url); //set the url we want to use curl_setopt($ch, CURLOPT_POSTFIELDS,$loginfields); //set the field $data = curl_exec($ch); //execute and get the results curl_close ($ch); 通過訪問網站外的php,模擬有人填寫了用戶名和密碼,然後提交給系統.
这个是SSO
也是模拟登陆的一种模拟登陆是将用户名和密码,通过socket发送到网站实现登陆
$url ='你的登陸頁面';
$user_login='';
$user_password='';
$loginfields = "user_login=$user_login&user_password=$user_password";
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 0); //set how many paramaters to post
curl_setopt($ch, CURLOPT_URL,$url); //set the url we want to use
curl_setopt($ch, CURLOPT_POSTFIELDS,$loginfields); //set the field
$data = curl_exec($ch); //execute and get the results
curl_close ($ch);
通過訪問網站外的php,模擬有人填寫了用戶名和密碼,然後提交給系統.