I used HttpUtil2 to get the pages HTML text but they are blocked by the site - Error: Forbidden? But when using the phones browser and typing in the address from the keyboard the page comes up fine.
So in basic4android how do i use the phone browser to get the HTML text.
This is the code that generates the Error
'=========================================================HttpUtils2
Sub Activity_Create(FirstTime As Boolean)
Page.Initialize("Page", Me)
Page.Download("http://www.411.com/search/FindNearby?utf8=✓&street=11406+boulder+ln&where=78726")
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Page"
Dim w as String
w = Job.getString
Log(w)
End Select
Else
Log("Error: " & Job.ErrorMessage) '<<<< this is where the error message is generated
End If
Job.Release
End Sub
'=========================================================HttpUtils2
HOWEVER
Typing http://www.411.com/search/FindNearby?utf8=✓&street=11406+boulder+ln&where=78726 into the phone browser works fine.
So in basic4android how do i use the phone browser to get the HTML text.
This is the code that generates the Error
'=========================================================HttpUtils2
Sub Activity_Create(FirstTime As Boolean)
Page.Initialize("Page", Me)
Page.Download("http://www.411.com/search/FindNearby?utf8=✓&street=11406+boulder+ln&where=78726")
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Page"
Dim w as String
w = Job.getString
Log(w)
End Select
Else
Log("Error: " & Job.ErrorMessage) '<<<< this is where the error message is generated
End If
Job.Release
End Sub
'=========================================================HttpUtils2
HOWEVER
Typing http://www.411.com/search/FindNearby?utf8=✓&street=11406+boulder+ln&where=78726 into the phone browser works fine.