02.09.2014, 22:19 
	
	
	
		I think it's a hosting problem, but i can't find how to solve it :S
I tried this:
And the echo didn't write anything.
	
	
	
	
I tried this:
PHP код:
<?php
/**
 *    Let's generate the string needed for the packet.
 */
$sIPAddr = "SAMP SERVER IP";                                                         // IP address of the server
$iPort = SAMP SERVER PORT;                                                                  // 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);                                                               // Close the connection
?>

