MC-Market is now BuiltByBit. Read more

executePHP 1.1

Register now to download for free
Enables players to type a command along with a code which will execute an external PHP script.
Tags
Tags
None
Originally created for archcry, executePHP enables players to type a command along with a code which will execute an external PHP script somewhere on your website. This is great for server owners that want their players to verify their Minecraft account, with their website/forums account.

Features
  • Easy and simple to configure.
  • Can be used for simple to very complex tasks.
  • Automatic update notifier.
  • Customisable return messages.
Commands
  • /executePHP - Shows the executePHP help page.
  • /executePHP reload [executePHP.reload] - Reloads the executePHP configuration file.
  • /verify <code> [executePHP.verify] - Will trigger the external PHP script with the optional variables.
Variables
Here are the variables you can use when defining your executePHP URL in the configuration file.
  • %username% - The username of the player who executed the command.
  • %code% - The code that the player entered with the command.
  • %uuid% - The UUID of the player who executed the command.
Have more ideas for variables? Suggest them in a ticket! (Not the comments)

Configuration Guide
Code:
#executePHP Configuration File
#Should executePHP check for updates on startup? Recommended to keep this at true.
checkUpdate: true
#The URL to submit the request to.
URL: http://localhost/executePHP?name=%username%&code=%code%
#The message displayed to the player when waiting for a response.
verifyingMessage: '&bVerifying your code, please wait...'
#This is the results section. You can have as little results as you want, or as much as you want.
results:
  success: '&aSuccessfully verifed code!'
  incorrect: '&cIncorrect code!'
  already-verified: '&6You have already verifed your code.'
  error: '&4We seroiusly have no idea.'

Example PHP Script
PHP:
<?php
    if (!empty($_GET['username']) && !empty($_GET['code'])){
        $name = $_GET['username'];
        $code = $_GET['code'];
        switch ($code){
            case "sugar":
                echo "success";
            break;
            case "milk":
                echo "incorrect";
            break;
            case "wheat":
                echo "already-verified";
            break;
            default:
                echo "error";
            break;
        }
    } else {
        echo "Error: No URL Variables.";
    }
?>

Author

nxtguy

Owner
Author
nxtguy
Downloads
12
Views
1,003
First release
Last update
Rating
Not yet rated

More resources from nxtguy

Analytics for your Minecraft server!
4.33 star(s) 3 ratings
70 downloads
This plugin will take messages you say to Steve and send them over to Cleverbot for a response!
Not yet rated
23 downloads
With AfterLife, players who die will now become ghosts who can haunt other players!
4.00 star(s) 1 ratings
19 downloads
Top
You need to upgrade!
Our dark style is reserved for our Premium members. Upgrade here.