Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // this first line is so that i can test the php file from a web interface. I was going to remove it when done.
- if($_GET!=array())$_POST=$_GET;
- if ($_POST['auth'] == "3fc52c779e781294") {echo("Connected.");} else {exit("Bukkit to PHP Password Incorrect.");}
- // these are here to print the $_POST array. The first is the one i was using before you told me about print_r
- // echo(" POST: ");foreach($_POST as $key => $val)echo("[".$key."=".$val."]");echo(" ");
- echo(print_r($_POST));
- // ignore this
- if ($_POST['test']){exit("test");}
- include_once("PHPsend.php");
- $php = new PHPsend();
- // this is here because i wanted to include several time functions.
- date_default_timezone_set("GMT");
- // this is the part that's having trouble. The ip, password, and port are correct.
- if ($_POST['ping']){
- echo("Status: ");
- // i have tried the port field with both 11223 and 25565, and none at all. i suggest you make this clearer in your documentation.
- echo($php->PHPconnect("86.4.163.232","3fc52c779e781294","11223"));
- // please do not try to connect to my server using this file.
- // ignore this
- // $php->PHPcommand("runalias /run /php ping ".time());
- echo($php->PHPcommand("runalias /run /broadcast WORKING"));
- echo($php->PHPdisconnect());
- // these php commands always result in an error code of 211, meaning the password was wrong, and the other naturally gave errors as there was no connection.
- }
- exit(1);?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement