ScriptBasic > Tutorials
Retriving a web page
(1/1)
Support:
Q. How would I go about getting the html from a web page on the net?
A. You have two options. You can use the built in socket support in ScriptBasic or use the cURL extension module.
ScriptBasic Native
--- Code: ---ON ERROR GOTO SiteError
OPEN "allbasic.info:80" FOR SOCKET AS #1
PRINT #1,"GET http://localhost/ HTTP/1.0\n\n"
WHILE NOT EOF(1)
LINE INPUT #1, page_line
PRINT page_line
WEND
CLOSE #1
END
SiteError:
PRINT "The web server allbasic.info on port 80 is not available\n"
--- End code ---
cURL Extension Module
Example on All Basic
Navigation
[0] Message Index
Go to full version