Public Sub Form_Open()
Dim hClient As HttpClient 'To create a HTTP Client
Dim sResult As String 'To store the word's meaning
hClient = New HttpClient As "hClient" 'Create a HTTP Client
With hClient 'With the Client..
.URL = "
https://divineapi.com/" 'Set up the URL
.Async = False 'No Asynchronous transmission?
.TimeOut = 60 'Don't hang around waiting for more than 60 seconds
.get 'Get the data
End With
While Lof(hClient) ' Lof has a value until all the file has been downloaded
sResult = hClient.ReadLine() ' Read 1 single line
If sResult Like "<meta property=\"og:description\" content=*" Then ' Here the line is found
sResult = Mid(sResult, InStr(sResult, "content=") + 9) ' trim out the left side
sResult = Mid(sResult, 1, RInStr(sResult, "\"") - 1) ' trim out the right side
hClient.Close ' close the stream
Break ' exit the loop
Endif
Wend
Print sResult
End