Hello,
@hplus0603 , i have considered of the possibility of running my own server but for security and uptime reasons i think web hosting is a better solution. I don't want to pay for hosting (at least not yet...) but i'll check Dreamhost as an alternative. curl with POST parameters gives 403 error code page......
Googling about curl i found this thread: https://unix.stackexchange.com/questions/139698/why-would-curl-and-wget-result-in-a-403-forbidden and i added in Unity a header:
www.SetRequestHeader("User-Agent", "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" );
This returned an html page with javascript:
<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("6813dbaad25f1153ed758aad49674422");
document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+";expires=Thu, 31-Dec-37 23:55:55 GMT;path=/";
location.href="http://myurl";
</script>
<noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript>
</body>
</html>
Where myurl= the url in my first post. I found out that the web host sets a cookie so i added in unity:
www.SetRequestHeader ("Cookie", string.Format ("__test=value got from Firefox inspector for the cookie"));
Then Unity worked for the http:// url , as expected.
When i tried https:// url, Unity responded with: Unknown Error and Error code: 0. Is there an easy way to make https:// url work? Wireshark dose not give any valuable info as everything is encrypted. The firefox inspector gives me the same value for the __test cookie on the https connection but i guess encryption messes it up?? Not sure how to proceed.....Https is a must for my project...
Thanks in advance.....