The following cURL extension module example retrieves a web page HTML and saves it to your PC. (webget)
' cURL webget
INCLUDE curl.bas
ch = curl::init()
curl::option(ch,"URL","http://scriptbasic.com/html/general.html")
curl::option(ch,"FILE","general.html")
curl::perform(ch)
curl::finish(ch)
cURL extension module documentationHere is a webget by opening a TCP socket using ScriptBasic.
OPEN "scriptbasic.com/html/general.html:80" for SOCKET AS #1
PRINT #1,"GET http://localhost/ HTTP/1.0\n\n"
WHILE NOT EOF(1)
LINE INPUT #1, content
PRINT content
WEND
CLOSE(1)