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

Author
Message
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
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?
Dutch
Qugurun
Valued Member
9
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.
Phaelax
DBPro Master
21
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:

http://myserver.com/script.php?i=image.jpg

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: 2024-04-19 15:42:17
Your offset time is: 2024-04-19 15:42:17