I Need to download some files from Server I use Retrofit ,Voelly and DownLoadManager which are some of ways to download files from server in android , but my response is not the things that I want .
I test my app with other URLs from other servers and it works perfectly.
When I test my app with my Host I get below Response From Server as HTML File.
This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support
I also test my download URl from My server in browsers and it returns the true file .
What is the problem with my server ???
My complete response
<html>
<body>
<script type="text/javascript" src="/aes.js" >
</script>
<script>
function toNumbers(d){
var e=[];
d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});
return e
}
function toHex(){
for(var d=[],d=1==arguments.length&&
arguments[0].constructor==Array?arguments[0]:arguments,e="",
f=0; f<d.length;f++)
e+=(16>d[f]?"0":"")+d[f].toString(16);
return e.toLowerCase()
}
var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),
b=toNumbers("98344c2eee86c3994890592585b49f80"),
c=toNumbers("4e617cfaefcd0f6f4fea87d72b611efa");
document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+";
expires=Thu, 31-Dec-37 23:55:55 GMT; path=/";
location.href="http://<myURL>/sang.epub?i=1";
</script>
<noscript>
This site requires Javascript to work, please enable Javascript in your
browser or use a browser with Javascript support
</noscript>
</body>
</html>
Many Internet Web sites contain JavaScript, a scripting programming language that runs on the web browser to make specific features on the web page functional. If JavaScript has been disabled within your browser, the content or the functionality of the web page can be limited or unavailable.
After getting a response from my host support team, I found that the problem is from Server Side. I have used the free hosting.
Support Team said to me that their free hosts are only for creating websites and not downloading files from them.
I think this is for be Scraping disabled or maybe not having SSL.
I finally used better free host provider which allows me to download files from server and send request from android client. My new Host Provider: www.000webhost.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With