- ©«¤l
- 24
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 55
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Moon
- µù¥U®É¶¡
- 2012-2-10
- ³Ì«áµn¿ý
- 2024-12-21
|
[µo°Ý] ½Ð°ª¤â¸Ñ´bÀ°¦£! ¤WÂdºô¯¸¤S§ïª©¤F!§ì¤£¨ì¸ê®Æ
¦U¦ì°ª¤â¤j¤j¦n
¤p§Ì쥻°Ñ¦Ò§O¤Hºô¤W¥Îxmlhttp¨Ó §ì¨ú¤WÂd¥æ©ö©ú²Ó. ¬Q¤Ñµo²{ÂdÂiºô¯¸§ïª©,¤p§Ì¥ÎFiddler¬d«Ê¥]¬Ý¤£¥X©Ò¥HµM!
Àµ½Ð°ª¤âÀ°¦£¸Ñ´b! ¤p§Ì·P¿E¤£ºÉ!
Sub ¤U¸ü¥æ©ö©ú²Ó(FilePath As String, stockid As String, saledate As String)
Set oXMLHTTP = CreateObject("Microsoft.XMLHTTP")
Set objStream = CreateObject("ADODB.stream")
webdate = Replace(saledate, Year(Date), CStr(CInt(Year(Date)) - 1911))
FileName = FilePath + "\" + saledate + "_" + stockid + ".CSV"
With oXMLHTTP
.Open "GET", "http://www.gretai.org.tw/ch/stock/aftertrading/broker_trading/download_ALLCSV.php", False
'.Open "POST", aa, False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.send "curstk=" & stockid & "&stk_date=" & webdate
If .readyState = 4 Then '.Status = 200
With objStream
.Type = 1 '¥H¤G¶i¦ì¤è¦¡¾Þ§@
.Open '¶}±Òª«¥ó
.Write oXMLHTTP.ResponseBody
If Dir(FileName) <> "" Then Kill FileName
.SaveToFile FileName
.Close
End With
End If
End With
Set oXMLHTTP = Nothing
Set objStream = Nothing
End Sub
¥H¤U¬O¤WÂdºô¯¸ªººô§}
http://www.gretai.org.tw/ch/stock/aftertrading/broker_trading/brokerBS.php
·PÁ±z~~~~ |
|