php用curl獲取163郵箱的聯絡人

2022-05-18 09:25:35 字數 2281 閱讀 7425

郵箱賬號:@ 163.com

郵箱密碼:

<?php

if(!empty($_post))

$fields_string = rtrim($fields_string , '&');

curl_setopt($ch, curlopt_cookiesession, true);

//關閉連線時,將伺服器端返回的cookie儲存在以下檔案中

//跳轉

//將之前儲存的cookie資訊,一起傳送到伺服器端

curl_setopt($ch, curlopt_cookiefile, $cookie);

curl_setopt($ch, curlopt_cookiejar, $cookie);

$result = curl_exec($ch);

curl_close($ch);

//取得sid

preg_match('/sid=[^\"].*/', $result, $location);

$sid = substr($location[0], 4, -1);

//file_put_contents('./result.txt', $sid);

//通訊錄位址

//開始抓取內容

preg_match_all('/]*>(.*?)<\/a><\/td>]*>(.*?)<\/a><\/td>/i', $result,$infos,preg_set_order);

//1:姓名2:郵箱

echo "

";

print_r($infos);

echo "

";

/** 下面就可以為所欲為了- -*/}

?>

php用curl獲取163郵箱的聯絡人

郵箱賬號 163.com 郵箱密碼 if empty post fields string rtrim fields string curl setopt ch,curlopt cookiesession,true 關閉連線時,將伺服器端返回的cookie儲存在以下檔案中 跳轉 將之前儲存的cook...

PHP模擬登陸獲取163郵箱聯絡人

error reporting 0 郵箱使用者名稱 不帶 163.com字尾的 user papatata test 郵箱密碼 pass 000000 目標郵箱 mail addr uenucom 163.com 登陸 url ch curl init url 建立乙個用於存放cookie資訊的臨時...

php 使用 CURL 獲取資料

第一種,post 和 get 合併 output curl exec cl 執行 curl 會話 curl close cl return output 第二種 post 和 get分開post post資料 curl setopt ch,curlopt post,1 curl setopt ch,...