[請益] 使用simple_html_dom parsing aspx的網站
請問一下
我使用 simple_html_dom 去抓取一個aspx網站的內容
作法如下
$data=array(
'__EVENTTARGET'=>'',
'__EVENTARGUMENT'=>'',
'__LASTFOCUS'=>'',
'__VIEWSTATE'=>'',
'__EVENTVALIDATION'=>'',
);
$data_url = http_build_query($data);
$data_len = strlen ($data_url);
$request = array(
'http' => array (
'method' => 'POST',
'content' => $data_url,
'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
"Content-Length: " . $data_len . "\r\n"
)
);
$context = stream_context_create($request);
$html = file_get_html(
'http://www.url.com.tw/history.aspx',
false,
$context
);
可是以下這幾個欄位
__EVENTTARGET
__EVENTARGUMENT
__LASTFOCUS
__VIEWSTATE
__EVENTVALIDATION
不知道要填什麼
因為他是一連串不明的編碼
可是如果保持空白
或是填入與 fiddler中看到相同的值的話
抓到的都是此網頁不存在
請問針對aspx的這種網頁
該如何去parsing
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.85.180.156
推
07/09 11:08, , 1F
07/09 11:08, 1F
→
07/09 12:51, , 2F
07/09 12:51, 2F
→
07/09 12:52, , 3F
07/09 12:52, 3F
→
07/09 12:52, , 4F
07/09 12:52, 4F
→
07/09 12:53, , 5F
07/09 12:53, 5F
推
07/09 14:18, , 6F
07/09 14:18, 6F
→
07/09 15:21, , 7F
07/09 15:21, 7F
→
07/09 15:22, , 8F
07/09 15:22, 8F
→
07/09 15:23, , 9F
07/09 15:23, 9F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 5 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章
4
18
6
15