Get text from a webpage?


  • Posts: 305
I see a block where i can post DATA to a webpage. Can i grab text from a page?

I basically want people to be able to save their levels via string to a blank html page online.
Then i want stencyl to grab that text and put it in an attribute or something.

I have no idea what i'm doing here, so maybe this is a longshot but it would be incredibly cool.


  • *
  • Posts: 4440
It's possible, but probably a little different from what you think. You won't just be editing/retrieving text from a web page using those blocks. Those blocks are used to send POST data to a web page. That data isn't written to the page, but it's accessible to any server-side script hosted on that page.

If you write a script on the page which looks at the POST data, determines if the user wants to save/load a level, and connect with a database to store/retrieve the info, you can have a level building/sharing system fully integrated with your game.

If you have access to server-side scripting, such as PHP, and a database on the server you're planning to use, it won't be too much trouble to get such a system set up.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)