<?php
$host = '127.0.0.1'; // paintchat ip
$port = 12345; // paintchat port
if (!($tp = stream_socket_client("tcp://{$host}:{$port}", $err, $str)))
{
exit("ERROR: Failed to connent - {$err} - {$str}\n");
}
else
{
fwrite($tp, '<paintchat type="paintchat.infomation" request="userlist" />'."\0");
while(!feof($tp))
{
echo fgets($tp, 128);
}
fclose($tp);
}