HttpRequest not working?
Monkey Targets Forums/HTML5/HttpRequest not working?
| ||
Before anything else, I did search the forum for this issue, and tried several things. and none of them work :( I'm running this code: Which is the example in the docs, just commented out the POST and changed the URL. I even hosted it on the same domain I try to access: http://icongames.com.br/cweel/request.html All I get is this: Http GET complete! Status=0 ResponseText= Running the sample with GLFW it works and I get the response I hope. Can someone please help me out? I really need this for a project I'm doing - and I can't believe this isn't working :( |
| ||
Hmm... I use httprequest in my game and it works even for HTML5. It has to run exactly in the same folder as the php scripts I use, so I have this structure: ./script.php ./data ./main.js ./MonkeyGame.html That way at least it works for me. Locally it doesn't (without a localhost server this is obviously the main reason) |
| ||
A-Ha! Now I've got it - the problem is I was using the full URL to GET/POST data. When I changed http://www.icongames.com.br/cweel/gethigh-win.php to just gethigh-win.php it works :) Phew! I was really worried there for a sec! :) Thanks Xaron, thanks to your comments I got this idea :D |