Advertisement
Guest User

Untitled

a guest
Apr 4th, 2011
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 0.35 KB | None | 0 0
  1. PUBLIC SUB getfile()
  2.  
  3.  
  4.   DIM h AS HttpClient
  5.   DIM buffer AS String
  6.   h = NEW HttpClient AS "h"
  7.   h.URL = "http://www.google.com/"
  8.   h.Async = FALSE
  9.   h.Timeout = 60
  10.   h.Get
  11.  
  12.   PRINT "begin"
  13.   IF h.Status < 0 THEN
  14.     PRINT "ERROR"
  15.   ELSE
  16.     ' Success - read the data
  17.     IF Lof(h) THEN READ #h, buffer, Lof(h)
  18.     PRINT buffer
  19.   END IF
  20.  
  21.   PRINT "end"
  22.  
  23. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement