So how would I impliment this into a form, my form code is below
Form:
<form class="well" form action="Scripts/IronDonator" method="post">
                    <label>Minecraft Player Name</label>
                    <input type="text" name="playername" class="span3" placeholder="Type something…">
                    <button type="submit" class="btn btn-info">Buy Now!</button>
                  </form>
And I take it the script would look like:
<?php
     $HOST = "123.456.7.891"; //the ip of the bukkit server
     $password = "YourPasswordHere.";
     $playername = file_get_contents('last_payment.dat');
     //Can't touch this:
     $sock = socket_create(AF_INET, SOCK_STREAM, 0)
     or die("error: could not create socket\n");
     $succ = socket_connect($sock, $HOST, 4445) 
     or die("error: could not connect to host\n");
     //Authentification
     socket_write($sock, $command = md5($password)."<Password>", strlen($command) + 1)
     or die("error: failed to write to socket\n");
     //Begin custom code here.
     socket_write($sock, $command = "/Command/ExecuteConsoleCommand:changegroupcommand $playername Donor;", strlen($command) + 1)
     or die("error: failed to write to socket\n");
     socket_write($sock, $command = "/Command/ExecuteConsoleCommand:givekitcommand $playername Donor;", strlen($command) + 1)
     or die("error: failed to write to socket\n");
     socket_write($sock, $command = "/Command/ExecuteConsoleCommand:givemoneycommand $playername 1000;", strlen($command) + 1)
     or die("error: failed to write to socket\n");
?>
Also would this work so user1 came used the form with the username user1 and then user2 came and used it with user2, would it just activate the script accordinly?