|
Post by kelvinkoolohm on Jan 17, 2021 7:39:18 GMT
is it possible to use JustBASIC to download and open a web HTML file to search for a text string?
How about with Liberty BASIC?
|
|
|
Post by tenochtitlanuk on Jan 17, 2021 12:57:00 GMT
Dead easy in Liberty... Following code will download and save an html file and an image from my LB website. Uses LB4 syntax/commands, Y ou 'll also find on my website a slightly longer LB method calling a dll that will fetch anything, works on earlier LB versions too. See my LB website'Download html and image from given URL to file on disk.
'LB NL 141?? & Alyce's Restaurant. Modified jhf.
' getting text file, eg html, css, etc. Print- or save as below. i$ = httpget$( "http://www.diga.me.uk/Sierpinski.html") print i$
' Getting images- have to save and display separately i$ = httpget$( "http://www.diga.me.uk/sierp1.gif") open "copyOfSierp1.gif" for output as #fOut #fOut i$; close #fOut
end
Searching within text of a downloaded file is also easy with things like mid$( and word$(.
|
|