1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Is it possible to accept HTTP Post requests in a PM plugin?

Discussion in 'Development' started by Steven4547466, Apr 25, 2020.

  1. Steven4547466

    Steven4547466 Creeper

    Messages:
    1
    GitHub:
    steven4547466
    Just as the title says, I haven't done a whole lot of PHP, but I know that you can set up websites that accept HTTP Post requests with it, so I was wondering if it's possible in a plugin (I assume it is because vote plugins need to work somehow, right?) and if so, how? (I'm mainly a Java plugin developer, I make private plugins for servers, but I have a client who runs a Pocketmine server and I need to know if this is possible, thanks.)
     
  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    You can have the plugin create a webserver, however that'll break it on almost every Minecraft server host as they'd block all ports but 19132. Most vote plugins just periodically query an api (example). If you need fast bidirectional, remote, communication consider using a tcp socket.
     
    GamakCZ likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.