Jump to content


Photo

Webserver Alpha v0.7 *Next version: Databases*


  • Please log in to reply
7 replies to this topic

#1 hellfly

hellfly

    GMC Member

  • New Member
  • 33 posts

Posted 21 June 2011 - 02:56 PM

Webserver Alpha v0.7

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.

  • 0

#2 Aragon

Aragon

    GMC Member

  • GMC Member
  • 138 posts

Posted 21 June 2011 - 07:55 PM

with databases you mean MySQL? Most website's call MySQL from php, which your server doesn't have.
  • 0

#3 Nial8r

Nial8r

    GMC Member

  • New Member
  • 341 posts

Posted 21 June 2011 - 08:18 PM

Cant download.
  • 0

#4 zachTaylor

zachTaylor

    GMC Member

  • New Member
  • 329 posts

Posted 21 June 2011 - 08:26 PM

with databases you mean MySQL? Most website's call MySQL from php, which your server doesn't have.


You can just use mysql on a local computer without php, you might have to write some tricky scripts though I think.
  • 0

#5 Nial8r

Nial8r

    GMC Member

  • New Member
  • 341 posts

Posted 21 June 2011 - 11:07 PM

I figured out the downloading problem. Rightclick and Save Target As.

Also:
How do you connect?

Edited by Nial8r, 21 June 2011 - 11:11 PM.

  • 0

#6 hellfly

hellfly

    GMC Member

  • New Member
  • 33 posts

Posted 22 June 2011 - 02:57 PM

I figured out the downloading problem. Rightclick and Save Target As.

Also:
How do you connect?



How do you mean, how do you connect?
  • 0

#7 Nial8r

Nial8r

    GMC Member

  • New Member
  • 341 posts

Posted 22 June 2011 - 07:05 PM

Nevermind.
This certainly is interesting, I didnt know webhosting was possible with 39dll.
  • 0

#8 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 24 June 2011 - 02:58 AM

Not recommended for serious use.
  • 3




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users