How do I fetch text from my website?

0 favourites
  • 2 posts
From the Asset Store
Fetch Quest
$19.99 USD
Fetch Quest 1 music pack is a collection of 10 in-game music loops.
  • I couldn't find a previous answer for this. But I'm looking to make a message board on my game's home layout with the latest news and whatnot. So instead of updating the game every time, I want the message board to change; I like it to fetch a string of text from my website. Any help would be appreciated thank you!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I would try setting up an endpoint on your website so that you can ask for the information from it by using the AJAX plugin and making a GET request from your game.

    That means that your website could have something like this

    https://www.your-website.com/my-end-point

    When you make a request to that URL, it should return the information you want.

    You would need to make sure this endpoint, asides from responding with the data you want in the body of the response, also responds with the header Access-Control-Allow-Origin: *, so your game can request the cross origin content.

    That last bit is important because AJAX requests to a domain different to the one the game is hosted in, will be blocked by default.

    Not sure how familiar you are with anything of that. It shouldn't be too difficult... as long as you know what you are doing.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)