16 lines
473 B
Plaintext
16 lines
473 B
Plaintext
OPTION TLS TRUE
|
|
website$ = "www.google.com"
|
|
|
|
OPEN website$ & ":443" FOR NETWORK AS mynet
|
|
|
|
SEND "GET / HTTP/1.1\r\nHost: " & website$ & "\r\n\r\n" TO mynet
|
|
WHILE WAIT(mynet, 1000)
|
|
RECEIVE dat$ FROM mynet
|
|
total$ = total$ & dat$
|
|
IF REGEX(dat$, "\r\n\r\n$") THEN BREAK : ' Quit receiving data when end indicator was reached
|
|
WEND
|
|
|
|
CLOSE NETWORK mynet
|
|
|
|
PRINT REPLACE$(total$, "\r\n[0-9a-fA-F]+\r\n", "\r\n", TRUE) : ' Remove chunk indicators from HTML data
|