HTTP

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
HTTP
Introduction:

This script simply allows very basic HTTP GET & POST request to be performed from within RPG Maker. These requests are *extremely* basic and there is not much customization available; however, there should be more than enough for most people.

Features:

Send GET and POST requests to a web server.

Screenshots:

Uhhh... Here is a table on how HTTP works...


How To Use:

Copy script and DLL into your own project, then alter the server addresses and whatever to suit your needs.

Demo:

Link

Credit:

Dekita / DekitaRPG

FAQ:



  Q: What is HTTP??
  A: The Hypertext Transfer Protocol (HTTP) is an application protocol for
     distributed, collaborative, hypermedia information systems. HTTP is the
     foundation of data communication for the World Wide Web.
     
     Hypertext is structured text that uses logical links (hyperlinks) between
     nodes containing text. HTTP is the protocol to exchange/transfer hypertext.
     
     See: http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol
     for additional information on HTTP and its functionality.
     
     In simple terms, HTTP allows one computer to interact with an online
     presence, whether that be another client server or a website is purely
     based on the competency of your code writing team.
     
  Q: How could HTTP benefit me, and my RPG Maker project?
  A: You can use HTTP within your own games to provide features that are widely
     considered as 'online features'.
     
     Using HTTP, it is extremely possible to have one players game interact with
     another players game. For example, sending mail from one player to another,
     or even player trades...

     
     This being said, the features that are possible is a completely different
     thing from the features you are able to apply yourself.
     The more experience you have with writing code, the better.
    
  Q: Is it client <-> server based?
  A: Yes, it is.
     The 'client' is the current instance of the game that is performing an HTTP
     request to a server. For example, if your game is connecting to information
     on your own website then your game is the client and the website is the
     game server.
     
  Q: Can you, for example, make a global high-score system with this?
  A: Yes, you could.


    
  Q: Does the system have scripts for both client and server?
  A: Not this basic version no.


   
  Q: Does it communicate with an Apache server?
  A: It should do; however, this is something I have not personally tested.
     I use it with an 'Abyss Web Server' on my laptop and also with my real
     website hosted via ipage.com. (other website hosts are available; however,
     the reason I chose ipage was due to their feature of allowing unlimited
     SQL databases.
         
     
  Q: Can it communicate with PHP scripts?
  A: Yep, thats the main point ~ to have your game interact with php scripts and
     SQL databases on your own server / a server you own.
     
    
  Q: Can this support MMO games or is lag an issue?
  A: No. Requests are synchronous and because of this, they lag the game when performing requests.


    
     
  Q: What HTTP request types are supported?
  A: The basic version of this system has only GET and POST request types.


    

 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
Ehhh...

I updated the FAQ (cause i foolishly copy and pasted it from my main project) and also, made a minor alteration in the dl ~ just in case anyone is currently using this. :)
 

terwilliker

Veteran
Veteran
Joined
Jul 25, 2014
Messages
49
Reaction score
1
Primarily Uses
This looks great. I was thinking of adding a new version detector for my game since it is going through beta testing and this might work. I could have an option to check for update and then put a ruby Sinatra app up on heroku to wait for the URL call and respond with info if an update is available.

Looking forward to trying it out.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
Indeed it could be used for an updater ~ here is one i made with my own (more advanced) version of this system, but it still uses GET and POST, so its certainly possible. :)
 

DhruvMC

Warper
Member
Joined
Jan 23, 2015
Messages
1
Reaction score
0
First Language
English
Primarily Uses
LoL this is gr8...

THX Man sooo much
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
Just updated this system and moved where im hosting it. Can now be found at the link below;

http://dekyde.com/1/post/2015/03/basic-http-processing-non-commercial.html

I also updated the link in the OP :)

The new updated version has two dll's. One that does everything, another that does the same in debug mode (printing a tonn of data to the console).  The debug dll is completely non redistributable and should only be used for debug purposes. :D

Altered the terms of this system somewhat dramatically ~ still not available commercially though ;)
 

Kyuukon

主人公
Veteran
Joined
Aug 22, 2013
Messages
2,216
Reaction score
1,078
First Language
Spanish
Primarily Uses
RMMV
This is sooo useful! Even though I'm not an expert I can tell you did a pretty good job :) !
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
Thanks ^_^

I have spent quite some time trying out various things and yea, its running as good as I can possibly make it (for beng a basic version) :D

Hopefully people will like what I have planned for release (next few days or so)... ;)

 

Benjamin Kuli

Veteran
Veteran
Joined
Jan 30, 2013
Messages
82
Reaction score
46
First Language
hungarian
Primarily Uses
N/A
This script is really awesome. Thank you for making it by taking your time. Even offline games with at least one online feature can make a basic idea to something more unique.

However, I encountered an error. When I wanted to try out the script, it didn't work. The script started to buff, but it didn't load anything at all. Then I decided to check out the script and the site which is featured in the script, and I realized that the links aren't working at all. :\

Here's an example: https://dekyde.com/BasicHTTPDemo/BasicGet.php

This one gives me the 404 - Page Not Found error, even though it is one of those links that should be loaded by the script.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
oh, interesting.

Thanks for bringing this to my attention.  Personally, I am getting an 'untrusted site' message with the above link.  gimme a few minutes and ill see whats going on.

Edit:

Ok..

I tested the link you posted and compared it with what it should be - first of all, you are attempting an https (notice the s) connection.. Additionally, you have missed a '5' from the end of he filename (as its stored on my server as a php5 file.

This is the correct link

http://dekyde.com/BasicHTTPDemo/BasicGet.php5

Additionally, I tested with the console opened in the demo and it prints the correct information to the console. :)
 
Last edited by a moderator:

Benjamin Kuli

Veteran
Veteran
Joined
Jan 30, 2013
Messages
82
Reaction score
46
First Language
hungarian
Primarily Uses
N/A
oh, interesting.

Thanks for bringing this to my attention.  Personally, I am getting an 'untrusted site' message with the above link.  gimme a few minutes and ill see whats going on.

Edit:

Ok..

I tested the link you posted and compared it with what it should be - first of all, you are attempting an https (notice the s) connection.. Additionally, you have missed a '5' from the end of he filename (as its stored on my server as a php5 file.

This is the correct link

http://dekyde.com/BasicHTTPDemo/BasicGet.php5

Additionally, I tested with the console opened in the demo and it prints the correct information to the console. :)
I only use https in my browser, but it was simple http for the code itself. I tested it and now the "BasicGet" works perfectly fine (it modified the variables it should), however, BasicPost still doesn't work at all. Neither in the browser, nor in-game.
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
Its also not working from within the example demo?  Very strange.

Could you show me the exact message from your console? (feel free to remove you IP address - I would, and have)

This is what mine shows...

Creating session as user -> .Created session as 'user' at host -> dekyde.com.Successfully connected to specified path.Creating HTTP GET Request.Sending HTTP GET Request.Getting HTTP GET Request's Response.Reading HTTP GET Request Response.Reading HTTP GET Request Response.Ending HTTP GET Request.Disconnecting from path.Closing session as 'user' at host -> dekyde.com.This information is being returned by Dekyde.com to IP:XX.XX.XX.XXXCreating session as user -> .Created session as 'user' at host -> dekyde.com.Successfully connected to specified path.Creating HTTP POST Request.Sending HTTP POST Request.Getting HTTP POST Request's Response.Reading HTTP POST Request Response.Reading HTTP POST Request Response.Ending HTTP POST Request.Disconnecting from path.Closing session as 'user' at host -> dekyde.com.Data being posted to dekyde.com is [ Dekita, He Is Awesome!! ]
Note: you can right click the console and then select the 'edit' and then 'mark' to select a region, then hit enter to copy the selected region (any other key will cancel the mark operation).

Also - you cannot do the post request to the server using the normal browser. It just wont happen. a POST request expects the information to be sumbitted in a specific format that typing the address into your browser simply cannot do.

If you try, this is what you would get -> http://www.dekyde.com/BasicHTTPDemo/BasicPost.php5
 

Benjamin Kuli

Veteran
Veteran
Joined
Jan 30, 2013
Messages
82
Reaction score
46
First Language
hungarian
Primarily Uses
N/A
Its also not working from within the example demo?  Very strange.

Could you show me the exact message from your console? (feel free to remove you IP address - I would, and have)

This is what mine shows...

Creating session as user -> .Created session as 'user' at host -> dekyde.com.Successfully connected to specified path.Creating HTTP GET Request.Sending HTTP GET Request.Getting HTTP GET Request's Response.Reading HTTP GET Request Response.Reading HTTP GET Request Response.Ending HTTP GET Request.Disconnecting from path.Closing session as 'user' at host -> dekyde.com.This information is being returned by Dekyde.com to IP:XX.XX.XX.XXXCreating session as user -> .Created session as 'user' at host -> dekyde.com.Successfully connected to specified path.Creating HTTP POST Request.Sending HTTP POST Request.Getting HTTP POST Request's Response.Reading HTTP POST Request Response.Reading HTTP POST Request Response.Ending HTTP POST Request.Disconnecting from path.Closing session as 'user' at host -> dekyde.com.Data being posted to dekyde.com is [ Dekita, He Is Awesome!! ]Note: you can right click the console and then select the 'edit' and then 'mark' to select a region, then hit enter to copy the selected region (any other key will cancel the mark operation).

Also - you cannot do the post request to the server using the normal browser. It just wont happen. a POST request expects the information to be sumbitted in a specific format that typing the address into your browser simply cannot do.

If you try, this is what you would get -> http://www.dekyde.com/BasicHTTPDemo/BasicPost.php5
Nevermind... find out that the problem was in my internet connection. >_> I solved the problem and everything's fine now, checked out the console and got the same details you shared with me. Thanks!
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
Lawl yea, sometimes I forget that the issue can also be the internet connection - forgetting to launch my server before testing and such :D

Pleased to hear that you managed to get the system working though, thats a huge sigh of releif :p

I was all like 'Schit, I'm about to release this other awesome system and now there is a problem with the core script" - thank goodness thats not the case ^_^
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
To understand is not the main goal - to create and manipulate, that is the desired result :D
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top