tufanv Expert Licensed User Longtime User Dec 19, 2016 #1 Hello, I can manually visit a webpage from my browser , but when i try to use Code: Dim j As HttpJob j.Initialize("j2", Me) j.Download("https://link") with my app , i get 403 forbidden. I need to donwload the source code of the website to get some data. But i think they somehow understand that the accessing file is jar file so they block it. Is there any way to change something with code so that i can download the source code or is it impossible ? TY
Hello, I can manually visit a webpage from my browser , but when i try to use Code: Dim j As HttpJob j.Initialize("j2", Me) j.Download("https://link") with my app , i get 403 forbidden. I need to donwload the source code of the website to get some data. But i think they somehow understand that the accessing file is jar file so they block it. Is there any way to change something with code so that i can download the source code or is it impossible ? TY
B billzhan Active Member Licensed User Longtime User Dec 19, 2016 #2 Press F12 in the Chrome or Firefox to inspect the HTTP request. Try to set request headers ( cookies , User-Agent, Host, session... ). Code: Dim j AsHttpJob j.Initialize("j2", Me) j.Download("https://link") j.GetRequest.SetHeader("cookie",cookie) j.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0") Upvote 0
Press F12 in the Chrome or Firefox to inspect the HTTP request. Try to set request headers ( cookies , User-Agent, Host, session... ). Code: Dim j AsHttpJob j.Initialize("j2", Me) j.Download("https://link") j.GetRequest.SetHeader("cookie",cookie) j.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0")
Erel B4X founder Staff member Licensed User Longtime User Dec 19, 2016 #3 The user agent header will probably fix this. The thread prefix shouldn't be [server] unless you are asking a question related to a server solution (based on jServer library). Upvote 0
The user agent header will probably fix this. The thread prefix shouldn't be [server] unless you are asking a question related to a server solution (based on jServer library).