ok here is what i have for my votifier code to test a server PHP: <?php //turn all errors on for debugini_set('error_reporting', E_ALL); //main functionfunction Votifier($public_key, $server_ip, $server_port, $username){//pharse the public key$public_key = wordwrap($public_key, 65, "\n", true);$public_key = EOF;//get user IP$address = $_SERVER['REMOTE_ADDR']; //set voting time$timeStamp = time(); //create basic required string for Votifier$string = "VOTE\mcserverslist.org\n$username\n$address\n$timeStamp\n"; //fill blanks to make packet lenght 256$leftover = (256 - strlen($string)) / 2;while ($leftover > 0) {$string.= "\x0";$leftover--;} //encrypt string before sendopenssl_public_encrypt($string,$crypted,$public_key); //try to connect to server$socket = fsockopen($server_ip, $server_port, $errno, $errstr, 3);if ($socket){fwrite($socket, $crypted); //on success send encrypted packet to serverreturn true;}elsereturn false; //on fail return false} $public_key = "My public key here not really this but my actual public key";$server_ip = "play.icyrelic.com";$server_port = "8192";$username = "IcyRelic"; $username = preg_replace("/[^A-Za-z0-9_]+/",'',$username); //call function, you can also improve the error reporting, this is only basicif(Votifier($public_key, $server_ip, $server_port, $username))echo 'Success!';elseecho 'Error!'; ?> it returns in the console saying unable to decrypt vote record make sure your public key matches the one you gave the server list
This code is copied from http://topg.org/php_votifier. Beside that you changed top from topg.org to mcserverslist.org (wich is rude) you also changed the function. PHP: //parse the public key (if you change anything here it won't work!)$public_key = wordwrap($public_key, 65, "\n", true);$public_key = <<<EOF-----BEGIN PUBLIC KEY-----$public_key-----END PUBLIC KEY-----EOF;