Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Loading images with html5 from server

Years of Service
User Offline
Joined: 27th Aug 2013
Posted: 19th Jan 2023 15:48
Hi, I wish to load an image that is in a folder on the server the html5 runs on. Preferably a subfolder. Is this achievable?
Valued Member
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 10th Feb 2023 11:59
You have to write a third-party script, for example in php, which you will call from agk, this script will upload files to the folder you specified on the server.
DBPro Master
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 10th Feb 2023 18:52
You can build a REST api. The php script below can be used to server up images (even from outside the web root).

You can call up an image like so:

This is just a basic example good for testing, but wouldn't use in production without some extra security in place (sanitizing the input)

Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda
Pixel-Perfect Collision

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Login to post a reply

Server time is: 2023-04-01 12:25:36
Your offset time is: 2023-04-01 12:25:36