How to get JSON file(-s) from server?

Discussion in 'Plugin Development' started by MrASTRO, Apr 15, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    MrASTRO

    Hello. So I have some test servers. I`ve made a plugin that creates JSON file with some info(current online, max slots, whitelistEnabled and so on). So I placed this plugin to all of my test servers. Each of them creates its own JSON file. And now I need my site to get this files and process them. But I dont know exactly how.. Any ideas?
     
  2. Offline

    timtower Administrator Administrator Moderator

    @MrASTRO Move the files over with FTP to the website.
    Read it on there.
     
  3. Offline

    MrASTRO

    I need to update info every 9-10 seconds. FTP isn't that good now, I think..
     
  4. Offline

    N00BHUN73R

    @MrASTRO
    He means, upload your json files to the web-server and then read it from your plugin by grabbing the url (yourwebsite.sdfsdf/jsonfile.json) and using BufferedReader or something
     
  5. Offline

    MrASTRO

    You misunderstood me. My plugin creates JSON and my site needs somehow to get this JSON. Site, not plugin.
     
  6. Offline

    timtower Administrator Administrator Moderator

    @N00BHUN73R That won't work, he wants to read it from the website itself, not the plugin.

    @MrASTRO Install a database, let the plugin write to that.
    Only need to update it when somebody joins or leaves and maybe every minute or so.
     
  7. Offline

    N00BHUN73R

    Oh my bad, sorry haha. Yeah timtowers way should work fine

    -- PixeLInc --
     
  8. Offline

    MrASTRO

    I`ll try, thanks :D
     
Thread Status:
Not open for further replies.

Share This Page