HTTP

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by ??????, Feb 26, 2015.

  1. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    [​IMG]
    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...

    [​IMG]

    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: Mar 15, 2015
    #1
    Bukarett, Kyuukon, Milena and 2 others like this.
  2. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    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. :)
     
    #2
    Seriel likes this.
  3. terwilliker

    terwilliker Veteran Veteran

    Messages:
    49
    Likes Received:
    1
    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.
     
    #3
  4. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    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. :)
     
    #4
  5. DhruvMC

    DhruvMC Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    English
    LoL this is gr8...

    THX Man sooo much
     
    #5
  6. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    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 ;)
     
    #6
  7. Kyuukon

    Kyuukon 主人公 Veteran

    Messages:
    2,217
    Likes Received:
    1,076
    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 :) !
     
    #7
    ?????? likes this.
  8. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    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)... ;)

    [​IMG]
     
    #8
  9. Benjamin Kuli

    Benjamin Kuli Veteran Veteran

    Messages:
    82
    Likes Received:
    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.
     
    #9
  10. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    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: Mar 18, 2015
    #10
  11. Benjamin Kuli

    Benjamin Kuli Veteran Veteran

    Messages:
    82
    Likes Received:
    46
    First Language:
    hungarian
    Primarily Uses:
    N/A
    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: Mar 18, 2015
    #11
  12. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    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
     
    #12
    Benjamin Kuli likes this.
  13. Benjamin Kuli

    Benjamin Kuli Veteran Veteran

    Messages:
    82
    Likes Received:
    46
    First Language:
    hungarian
    Primarily Uses:
    N/A
    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!
     
    #13
    ?????? likes this.
  14. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    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: Mar 18, 2015
    #14
  15. tiagoms

    tiagoms Veteran Veteran

    Messages:
    181
    Likes Received:
    4
    I think I'm too amateur to understand. yet. =)
     
    #15
    ?????? likes this.
  16. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    To understand is not the main goal - to create and manipulate, that is the desired result :D
     
    #16

Share This Page