"http_post_string" not working when running HTML?

tonyfinale

Member
In GMS2 I am trying to use the code "http_post_string" to upload high score data onto GMScoreboard.com, and though the code work fine and succeeds when I run the game as a Windows export, when I try to test the game in HTML I get no such results. It isn't even an error that appears; nothing happens at all.

Does this exact code not work quite the same in HTML? Or am I doing something foolish and missing something here.

I COULD use "url_open" instead which opens an entire new window that uploads the string and updates the leaderboard, but I'd prefer to avoid that method if possible.
 

TsukaYuriko

šŸŒ 
Forum Staff
Moderator
From the manual:
NOTE: You should be aware that due to XSS protection in browsers, requests to and attempts to load resources from across domains are blocked and may appear to return blank results. Please see the section on Cross Domain Issues for further details.

Have you investigated whether this could be the cause yet? Are the game and high scores separated? If so, this might be a good starting point.
 

FrostyCat

Member
GMScoreboard has had this issue for years, and their maintainers have entirely abdicated themselves. They could have added 1 line to their PHP code to make it work from HTML5 again, but they didn't even bother with that. Learn to make your own scoreboard or use another vendor.
 
  • Like
Reactions: Roa

tonyfinale

Member
This was also tots a duplicate post to already existing ones, but thanks much for putting up with me anyway gm fam. If I can't figure out this XSS stuff or come up with my own scoreboard I may just bite it and make uploading scores a downloaded version exclusive to my game or something.
 
Top