I have looked into Erel's topic about non-ui applications ( curl project) . In that project, the html code of a website is taken. With an ui app project , i can take the code into a textview and extract some values with text1.substring2. But with non-ui i think i cant use or create a textview because it is just a console app. What can i use to extract some values like with substring2.
You can download the whole URL into a string variable using httputils or the newer versions. Depending on what you want to extract, there may be other ways too.
You can download the whole URL into a string variable using httputils or the newer versions. Depending on what you want to extract, there may be other ways too.
I want to extract some exchange rates from the website. Normally for my b4i and b4a app i get the whole code in to a textview than i use text1.substring2(point1,point2)
to get the portion i want from the code.
'use httputils2 module (source code version which support non-ui, not *.jar lib
Dim linkstr As String = "http://yourtarget.com"
Dim j As HttpJob
j.Initialize("j", Me)
j.Download(linkstr)
Sub JobDone(j As HttpJob)
If j.Success Then
html_STR = j.GetString
html_STR.substring2(point1,point2)
Else
html_STR=""
End If
End Sub
'use httputils2 module (source code version which support non-ui, not *.jar lib
Dim linkstr As String = "http://yourtarget.com"
Dim j As HttpJob
j.Initialize("j", Me)
j.Download(linkstr)
Sub JobDone(j As HttpJob)
If j.Success Then
html_STR = j.GetString
html_STR.substring2(point1,point2)
Else
html_STR=""
End If
End Sub