hm ich hab aber nen ganz anderes problem:
bei mir kommt zwar was, aber iwie nix vernünfitges
ZitatSAMP�(3�Y/i��d����Mafia-Police TDM V8���Mafia vs. Police (Fort Carson-���Fort Carson
PHP
<?php
$sIPAddr = "188.40.51.243"; // IP address of the server
$iPort = 12121; // Server port.
$sPacket = ""; // Blank string for packet.
$aIPAddr = explode('.', $sIPAddr); // Exploding the IP addr.
$sPacket .= "SAMP"; // Telling the server it is a SA-MP packet.
$sPacket .= chr($aIPAddr[0]); //
$sPacket .= chr($aIPAddr[1]); //
$sPacket .= chr($aIPAddr[2]); //
$sPacket .= chr($aIPAddr[3]); // Sending off the server IP,
$sPacket .= chr($iPort & 0xFF); //
$sPacket .= chr($iPort >> 8 & 0xFF); // Sending off the server port.
$sPacket .= 'i'; // The opcode that you want to send.
// You can now send this to the server.
/**
* Let's connect now to the server.
*/
$rSocket = fsockopen('udp://'.$sIPAddr, $iPort, $iError, $sError, 2); // Create an active socket.
fwrite($rSocket, $sPacket); // Send the packet to the server.
echo fread($rSocket, 2048); // Get the output from the server
fclose($rSocket);
?>
Alles anzeigen
einer ne idee?