If you use httputils to get the content of a page which automatically forwards to another one, is there a way to get the URL of the page that it´s forwarding to? Of course you can scrape getrequest and be lucky to find it, if you know all forwarding methods, but if you don´t, or if the page is encrypted, how would you be able to find out which URL that you´re being sent to programatically?
Dim j As HttpJob
j.Initialize("", Me)
j.Download("http://www.b4x.com")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim jo As JavaObject = j.Response
Dim RedirectedRequest As JavaObject = jo.GetFieldJO("response").RunMethod("request", Null)
Dim url As String = RedirectedRequest.RunMethod("url", Null)
Log(url)
End If
j.Release
Dim j As HttpJob
j.Initialize("", Me)
j.Download("http://www.b4x.com")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim jo As JavaObject = j.Response
Dim RedirectedRequest As JavaObject = jo.GetFieldJO("response").RunMethod("request", Null)
Dim url As String = RedirectedRequest.RunMethod("url", Null)
Log(url)
End If
j.Release