This is a webserver I've made with the 39dll. I didn't make real graphics in it yet, but that will come later.
Functions:
Downloading files from webserver (doesn't work perfect yet)
Display a webpage
Server side scriptinglanguage (in GML)
Cookies
GER variables
Databases
Post variables
Allow the downloading of larger files by threads
(green = done, orange = buisy working on, red = coming later)
If you think there should be something else in the server, please post it here.
Known bugs:
Pictures are never displayed the first time a page loads. (does anyone know why?)
To large images or files don't work. (try to keep the total file size under 50 KB)
Files that are compatible:
.htm
.gmwc (This is the GML code that the server executes, explanation is further down)
(gmwc stands for: GameMaker Web Code)
.gif
.jpg / .jpeg
.png
.bmp
.ico*
.css*
.zip*
.rar*
.exe*
.js*
* = didn't test it yet, but i'm 95% sure it will work.
Download: Click (.rar, 1MB, Alpha v0.7)
Explanation about the scripting language:
The scripting language is just GML. Only I've added a few extra scripts.
This is a simple script that displays "Hello world!" to the browser.
echo("<html>
<body>
Hello world!
</body>
</html>");
This is a simple code that calculates a number and displays it to the browser:
var number;
number = 5;
echo("<html>
<body>
The number is now: " + string(number));
number *= 10; // multiply the number by 10
echo("<br/>
If you multiply the number by 10 it becomes: " + string(number));
echo("</body>
</html>");
There are a few variables and scripts that you can use in the .gmwc scripts:
scr: echo( string )
Ths script echoes a string to the browser
scr: set_cookie( name, value )
With this script you can set a cookie with the name <name> to value <value>
scr: get_cookie( name )
With this script you can get the value of cookie <name>
scr: get_get( naam )
With this script you can get a GET variable sent by the browser
var: browser_language
The language of the browser. This can be either EN, NL or an empty string
var: browser_host
This is the address of the host that the browser requests
var: browser_software
This is the name of the software of the browser, this can be:
Google Chrome
Safari
Opera
Orca
Mozilla Firefox
Internet Explorer
or an empty string
Edited by hellfly, 21 June 2011 - 03:08 PM.











