Vice Underdogs
Scripting => Script Showroom => Topic started by: stormeus on May 17, 2012, 02:07:48 am
-
Became extremely bored, wrote an HTTP server using Squirrel sockets over the course of two days. The server supports:
- HTTP requests
- Error handling (sending 500 Internal Server Errors on a script parsing exception)
- Query strings (in format of http://server/page/?param1=value1¶m2=value2)
- All functions provided by VC:MP Squirrel
- Modules loaded by your scripts
- Writing dynamic pages and static pages from existing files
The purpose of the server is to provide a limited form of providing web services to scripters directly from their game servers, such as a stats panel and remote administration, and is not suitable for forums, transmitting files, and probably some other complex things I couldn't be arsed to script into the server. ::)
I don't anticipate this server script taking off any time in the near future, so I won't be providing much support for it, though it may prove to be useful for any projects I do in the future, and possibly for someone else as well.
Without the example pages provided, the server is 603 lines long.
Download (1.0.0)
http://stormeus.vicelegends.com/SqHTTP.7z
-
What can I say.. Excellent as everytime.
-
I wanted the first post :'(
Very very very nice work :)
-
Interesting.
-
Heads up, after copying this script verbatim, fixing function names, and testing it in LU, I found that the server will NOT WORK verbatim in LU.
-
Updated to 1.0.0, introducing:
- POST support
- Forming pages from script files (examples provided in link)
- Proper query strings (?param1=value1¶m2=value2)
- Small aesthetic/performance modifications
- Change of name to SqHTTP
-
Updated to 1.0.0, introducing:
- POST support
- Forming pages from script files (examples provided in link)
- Proper query strings (?param1=value1¶m2=value2)
- Small aesthetic/performance modifications
- Change of name to SqHTTP
Bump!
Do you still have the live link to this? i am up to something.
-
Nah, I think the files I had for this are long gone, sorry.
-
Nah, I think the files I had for this are long gone, sorry.
Can you atleast give me the philosophy behind a squirrel socket to use it as a listener, because after all these years i forgot about this crap. ._.