Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to fetch a website ?
#2
I would probably try HttpConnect, HttpFileGet (for every file) and HttpDisconnect. HttpFileGet downloads file to str variable. Another sample is in System\Functions\Internet\HTTP\samples\HTTP sample 2.

Code:
Copy      Help
str files="index.html[]resources.html[]images\toolbar1.gif"

;If not connected to internet, try to connect:
if(!IntDial("My Connection" 1)) ret

;Connect to HTTP server:
HttpConnect("www.quickmacros.com")

;Download and show files:
str s file
int i
for i 0 100000
,if(file.getl(files i)<0) break
,s.fix(0) ;;HttpFileGet forgot it
,if(HttpFileGet(file &s)) ShowText(file s)
,

;Disconnect:
HttpDisconnect
out "The End"


QM http extensions aren't very smart. For example they can hang up and then you must restart QM to get them working again.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)