Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compile Exe
#Dim All
#Include "win32api.inc"
#Include "MSXML.inc"
Function PBMain () As Long
Local sUrl As WString, sMethod As WString, oXml As IServerXMLHTTPRequest2, temp$
Set oXml = NewCom "MsXml2.ServerXMLHTTP.6.0"
sUrl = "https://www.radio3k.com/file.txt"
sURL = "https://powerbasic.herokuapp.com/downloads/orders.csv"
sMethod = "GET"
If IsTrue(IsObject(oXml)) Then
? "bingo"
oXml.Open(sMethod, sUrl, %FALSE)
oXml.Send()
Do While oXml.ReadyState<>4
Sleep 0
'temp$ += "[" & STR$(oXml.ReadyState) & "]"
Loop
? oXml.ResponseText
Else
? "Failed!"
End If
End Function
http://www.garybeene.com/sw/gbsnippets.htm