日期:2014-05-17 浏览次数:20413 次
$message = '';
$message .= pack("a99", $mail);
$message .= pack("a32", $pass);
$message .= pack("a19", $action);
$from = '';
$port = 0;
//echo $message;
if ($socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP))
{
//socket_bind($socket, '127.0.0.1', 27015);
socket_sendto($socket, $message, strlen($message), 0, $server_ip, $server_port);
$ret = socket_recvfrom($socket, $result, 12, MSG_WAITALL, $from, $port);
}