executePHP — Link Your Minecraft Server to PHP Scripts

The executePHP plugin for Minecraft lets you run external PHP scripts from in-game chat, enabling account verification, rewards, and website integration without complex APIs.

Download executePHP for Minecraft 1.6.2

Original name: executePHP

Minecraft: 1.6.2

FileVersionLoaderSize
executePHP.jar1.6.217 КБDownload

Bridging Minecraft and the Web with the executePHP Plugin

Minecraft server administrators are constantly seeking ways to connect the in-game experience with external web services, such as project websites, community forums, or donation platforms. The executePHP plugin addresses this need with a straightforward yet powerful approach: it allows players to trigger external PHP scripts directly from the game using simple commands. Originally developed for the archcry project, this tool has gained traction in the community due to its flexibility and ease of use. The workflow is simple: a player types a command with a code, the server sends a request to your website, and the response from the PHP script appears instantly in the game chat. No complex APIs are required, just standard Bukkit/Spigot functionality and your own code.

Core Features of the executePHP Plugin

The plugin is intentionally not overloaded with features, but every included function operates reliably and predictably. Here is what you get immediately after installation:

  • Instant account verification — link a player's in-game profile to a website account using a unique code.
  • Simple configuration — specify the script URL and messages in the configuration file with minimal effort.
  • Flexible response system — define any number of outcomes (success, incorrect, already-verified, and more) with custom colored messages.
  • Automatic update checks — the plugin notifies administrators when a new version is released.
  • Variable support — pass the player name, code, and UUID directly within the request URL.

Commands and Permissions

The plugin introduces only three commands, yet they cover all necessary use cases. Administrators can reload the configuration on the fly, while players can initiate verification. The full list is as follows:

  • /executePHP — displays a help page with usage tips.
  • /executePHP reload (permission: executePHP.reload) — reloads the configuration file without restarting the server.
  • /verify (permission: executePHP.verify) — sends a request to the external PHP script with the provided code and variables.

When a player enters the command, the plugin substitutes their username, UUID, and code into the URL that you have predefined in the configuration. At that moment, your script executes on the web server, and its response is converted into a message in the Minecraft chat. For players who frequently connect to servers with custom plugins and want to avoid manual mod installation, using a modern launcher that allows downloading mods directly from the menu is a practical solution, especially when playing on modpacks with numerous additional mechanics.

Variables for Fine-Tuned Control

The main strength of executePHP lies in dynamic data substitution. You can format the URL to contain all relevant information about the request. The following variables are available:

  • %username% — the nickname of the player who executed the command.
  • %code% — the code entered by the player after /verify.
  • %uuid% — the unique identifier of the player, useful for precise account linking.

An example URL in the configuration might look like this: http://yoursite.com/executePHP?name=%username%&code=%code%. When the command /verify secret123 is invoked, the plugin automatically replaces the variables and sends a GET request. You are free to add any other parameters if you extend the PHP script accordingly.

Plugin Configuration Details

The settings file uses the YAML format and is intuitive to understand. The key sections include:

  • checkUpdate: true — enables automatic update checks when the server starts.
  • URL — the address of your PHP script with variables.
  • verifyingMessage — the message shown to the player while the request is being processed (supports color codes via &).
  • results — a block where you list possible responses from the script and their corresponding chat messages. For example, if the PHP script returns the string "success", the player sees a green "Successfully verified code!" message.

You can define any number of results, from a few to ten different statuses. This opens the door to complex scenarios such as privilege checks, reward distribution, or synchronization with the website's database. The plugin supports Minecraft versions commonly used with Bukkit and Spigot loaders, making it compatible with a wide range of server setups.

Example PHP Script for Verification

To clarify the process, here is a minimal working example of a script that handles requests from the plugin:

<?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.";
}
?>

The script accepts two parameters, compares the code against a list, and returns one of the predefined strings. The plugin then matches this string to the results in the configuration and displays the appropriate message to the player. No magic involved, just PHP and a bit of YAML.

Planned Enhancements

The developer continues to improve the plugin. The roadmap includes several interesting additions that will make executePHP even more capable:

  • Asynchronous PHP execution — requests will not block the main server thread, positively impacting performance.
  • Request timeout — if the script does not respond within a set time, the plugin will return an error instead of making the player wait indefinitely.
  • Returnable commands — the ability to execute server commands based on the PHP script's response, such as granting a group or item.

These features will transform the plugin into a full-fledged bridge between the game world and web infrastructure.

Why You Should Try executePHP Now

The executePHP plugin is more than just a verification tool; it is a constructor for interacting with external systems. It is lightweight, requires no deep Java knowledge, works on various Bukkit/Spigot versions, and can be configured in minutes. If you want to let players confirm registrations, receive bonuses for forum activity, or trigger complex scenarios with a single code, this plugin will become an indispensable assistant. Regular updates and a responsive author ensure the project evolves alongside your needs. To get started, search for "download Bridging Minecraft and the Web with the executePHP Plugin" from a trusted source, review the "Bridging Minecraft and the Web with the executePHP Plugin for Minecraft" documentation, and follow the "how to install" guide provided in the plugin's readme file.

In conclusion, executePHP bridges the gap between Minecraft and the web with minimal overhead and maximum flexibility. Whether you run a small community server or a large network, this plugin offers a clean, scriptable interface to your existing web services, making it a valuable addition to any administrator's toolkit.