ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°ª¤â¸Ñ´bÀ°¦£! ¤WÂdºô¯¸¤S§ïª©¤F!§ì¤£¨ì¸ê®Æ

[µ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~~~~
Happy

¥»©«³Ì«á¥Ñ joey0415 ©ó 2013-12-31 10:42 ½s¿è

ªº½T§ïª©¤F¡A¦Û¤v¤]ªá¤FÂI®É¶¡­×§ï

ºô§}Ãþ¦ü

http://www.gretai.org.tw/ch/stock/aftertrading/broker_trading/download_ALLCSV.php?curstk=1558&stk_date=1021230

¨ä¾l¦Û¦æ­×§ï

TOP

¦^´_ 2# joey0415


  J¤j,
½Ð´£ÂI¤p§Ì! ¥i¥H¤U¸ü,«oµo²{¤U¸üªº³£¬O¨S¦³¥æ©ö¸ê®Æªº *.csvÀÉ ,¬O°Ñ¼Æ¦³­þ¸Ì¤£¦P¤F??  
·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 "POST", "http://www.gretai.org.tw/ch/stock/aftertrading/broker_trading/download_ALLCSV.php", 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
Happy

TOP

½Ð±Ð J¤j,
"application/x-www-form-urlencoded" ¬O§_À³§ï¦¨ "application/csv"
·PÁ±z~~~~
Happy

TOP

¦^´_ 2# joey0415


    ·PÁÂJ¤j,
¦p±z©Ò»¡! ­×§ï¦r¦ê´NOK¤F~~

ÁÂÁ±z~~~~
Happy

TOP

½Ð°Ým¤j¦p¦ó­×§ï¦r¦ê¡H¥i¥Hpost¤W¨Ó¶Ü¡A§Ú¤]¥¿¦b¾Ç²ß¡AµL­­·P®¦¡I¡I

TOP

¦^´_ 6# kcl00168

¨Ì·ÓJ ¤jªº´£¥Ü, ­×§ï³o¤@­Ó¦ì§}, ´N¥i¥H¤F~~
­ì¥»ªº: http://www.gretai.org.tw/ch/stock/aftertrading/broker_trading/download_ALLCSV.php
­×§ï«á: http://www.gretai.org.tw/ch/stock/aftertrading/broker_trading/download_ALLCSV.php?curstk=1558&stk_date=1021230

ÃÒ¥æ©Ò¦³®É·|§ï¹L¨Ó¤S§ï¹L¥h~¯uªº¬O@%*&#.,^#
Happy

TOP

·PÁ¤j¤j¦^´_¡A§Ú§ï¥H«á¤£¯à¤U¸ü¡A¤£ª¾±z¯à¤U¸ü¶Ü¡H§Ú³£°±¯d¦b .send "curstk=" & stockid & "&stk_date=" & webdate

TOP

¦^´_ 8# kcl00168


    §Ú¦³¨ÇÀɮפU¸ü¤]¤£§¹¥þ,±¡ªp¸ò±z­z»¡ªºª¬ªp¤@¼Ë~~~
¶Ë¸£µ¬¤F~~~~
Happy

TOP

¦^´_ 9# million2billion

serverºÝ§ïª©«á, ¤£ª¾¹D¬O¤£Ã­ÁÙ¬O·|¾×£®~~~~²{¦b³sºô­¶¤]¶i¤£¥h. ºô­¶°T®§¦p¤U!


ÁV¿|¡IGoogle ÂsÄý¾¹µLªk³s½u¦Ü www.gretai.org.tw

½Ð­«·s¸ü¤J¡G www.-gretai.-org.-tw/-ch/-stock/-aftertrading/-broker_trading/-brokerBS.-php
Happy

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD