VB6web抓圖

Home Home
引用 | 編輯 w791212w
2008-09-23 20:35
樓主
推文 x0
我參考的網站http://www.blueshop.com.tw/board/show.asp?subcde=BRD20080817215842I ..

訪客只能看到部份內容,免費 加入會員



獻花 x0
引用 | 編輯 三仙
2008-09-24 00:53
1樓
  
下面是引用w791212w於2008-09-23 20:35發表的 VB6web抓圖:
我參考的網站http://www.blueshop.com.tw/board/show.asp?subcde=BRD20080817215842IQS
可是我抓下來是有啦832B一點都不像圖的大小...也打不開
我抓的圖位子在:http://140.111.90.8/ac/index.php?op=AuthImageShow&blogId=432

不知道大大能幫我解決嗎?這實在太詭異了


一點都不詭異,我分析給你參考

----------你要捉圖的網頁程式碼--------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0060)http://140.111.90.8/ac/index.php?op=AuthImageShow&blogId=432 -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY><IMG src="index_php.files/index.gif"></BODY></HTML>
----------你要捉圖的網頁程式碼--------------------

----------你參考要捉圖的程式碼--------------------
Dim Bilden() As Byte
Bilden() = Inet1.OpenURL("http://140.111.90.8/ac/index.php?op=AuthImageShow&blogId=432", icByteArray)
Open "C:\432.jpg" For Binary Access Write As #1
Put #1, , Bilden()
Close #1
-----------你參考要捉圖的程式碼-------------------

因為C:\432.jpg 副檔名是圖檔型態
所以 icon 是圖檔的 icon
如果你把 jpg 改成 txt
就會得到一個錯誤的提示文字檔(請注意紅色的部份)

-----------改成txt後的檔案內容-------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTTP Error 403</title>
</head>
<body>
<h1>Error 403</h1>
<p>We're sorry, but we could not fulfill your request for
/ac/index.php?op=AuthImageShow&blogId=432 on this server.</p>
<p>You do not have permission to access this server.</p>
<p>Your technical support key is: <strong>3cf4-0f6a-17f4-e8c8</strong></p>
<p>You can use this key to <a href="fix">[url]http://www.ioerror.us/bb2-support-key?key=3cf4-0f6a-17f4-e8c8">fix[/url] this problem yourself</a>.</p>
<p>If you are unable to fix the problem yourself, please contact <a href="[url=mailto:admin+nospam@nospam.yourblog.com]admin">mailto:admin+nospam@nospam.yourblog.com">admin[/url] at yourblog.com</a> and be sure to provide the technical support key shown above.</p>
-----------改成txt後的檔案內容-------------------

至於要捉圖片驗証碼
就要看網頁是否有防止站外提交
不然你可以用 WebBrowser 來試試取得Document

獻花 x0