真心佩服
DECLARE LONG GetProcessHeap IN Kernel32 DECLARE LONG HeapAlloc IN kernel32 LONG, LONG, LONG DECLARE LONG HeapFree IN Kernel32 LONG, LONG, LONG DECLARE LONG strstr IN msvcrt LONG,STRING@ CREATE CURSOR 大乐透 (红1 C(2), 红2 C(2), 红3 C(2),红4 C(2),红5 C(2),兰1 C(2),兰2 C(2),期号 C(5),球具 N(1)) cUrl = "https://webapi./gateway/lottery/getHistoryPageListV1.qry?gameNo=85&provinceId=0&pageSize=0&" + SUBSTR(SYS(2015), 2) oHTTP=NEWOBJECT("MSXML2.XMLHTTP") oHTTP.Open("GET", cUrl, .F.) oHTTP.SETREQUESTHEADER("Content-Type", "text/html;charset=UTF-8") oHTTP.Send() lcText = oHTTP.ResponseText t1 = SECONDS() nSize = LEN(lcText)+1 pText = HeapAlloc(GetProcessHeap(), 8, nSize) SYS(2600, pText, nSize, lcText+0h00) p = strstr(pText, "lotteryDrawNum") DO WHILE p > 0 DrawNum = SYS(2600, p+17, 5) p2 = strstr(p, "lotteryDrawResult") + 20 p = strstr(p2, "lotteryEquipmentCount") + 23 EquipmentCount = VAL(SYS(2600, p, 1)) INSERT INTO 大乐透 VALUES (SYS(2600, p2, 2),; SYS(2600, p2+3, 2),; SYS(2600, p2+6, 2),; SYS(2600, p2+9, 2),; SYS(2600, p2+12, 2),; SYS(2600, p2+15, 2),; SYS(2600, p2+18, 2),; DrawNum, EquipmentCount) p = strstr(p, "lotteryDrawNum") ENDDO ? SECONDS() - t1 && 0.094 HeapFree(GetProcessHeap(), 1, pText) SELECT * FROM 大乐透 RETURN