Правила форума Гаранты форума
Размещение рекламы AMX-X компилятор

Здравствуйте, гость Вход | Регистрация

Наши новости:

14-дек
24-апр
10-апр
11-апр

Скрипт количество игроков на сервере

Статус пользователя Boo
сообщение 14.11.2010, 12:59
Сообщение #1


Стаж: 17 лет

Сообщений: 468
Благодарностей: 22
Полезность: 73

Нужен скрипт который бы показывал кто играет на сервре, его ник, кольоко убил и сколько времени играет без баз данный MySQL и прочих!!!!
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
Tr1sT
сообщение 14.11.2010, 13:15
Сообщение #2
Стаж: 16 лет
Город: localhost

Сообщений: 1299
Благодарностей: 683
Полезность: 1021

ого запросы без базы и т.д ))
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя SinxroFazaTroLL
сообщение 14.11.2010, 13:46
Сообщение #3


Стаж: 15 лет

Сообщений: 44
Благодарностей: 15
Полезность: 102

cbf1b2bfde1a.gif Без БД никак!
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Flesh
сообщение 14.11.2010, 14:31
Сообщение #4


Стаж: 17 лет

Сообщений: 319
Благодарностей: 168
Полезность: 776

Если не знаете то не отвечайте
https://forum.lightmon.ru/topic65.html
Вот тут посмотри. Я думаю под себя его несложно переделать.

Отредактировал: Xtrimal, - 14.11.2010, 14:31
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Somm
сообщение 14.11.2010, 15:30
Сообщение #5


Стаж: 15 лет

Сообщений: 37
Благодарностей: 17
Полезность: 351

Можно через WebMod, переделать его слегка, убрать лишнее и будет тебе то что ты хочешь. Но в нём есть уязвимость и сервер могут положить.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя pike
сообщение 14.11.2010, 17:45
Сообщение #6


Стаж: 18 лет

Сообщений: 956
Благодарности: выкл.

Цитата(bookkc @ 14.11.2010, 12:59) *
Нужен скрипт который бы показывал кто играет на сервре, его ник, кольоко убил и сколько времени играет без баз данный MySQL и прочих!!!!

Сам скрипт

<?php

class ServerInfo {
var $connected;
var $resource;
var $ip;
var $port;
var $raw;

function ServerInfo() {
$this->connected = false;
$this->resource = false;
}

function connect( $address, $port = 27015) {
$this->disconnect();
$this->port = (int)$port;
$this->ip = gethostbyname( $address );
if( $this->resource = fsockopen( 'udp://' . $this->ip, $this->port ) ) {
$this->connected = true;
stream_set_timeout( $this->resource, 2);
}
}

function disconnect() {
if( $this->connected ) {
fclose( $this->resource );
$this->connected = false;
}
}

function getByte() {
$return = ord( $this->raw[0] );
$this->raw = substr( $this->raw , 1 );
return $return;
}

function getShort() {
$return = (ord($this->raw[1]) << 8) | ord($this->raw[0]);
$this->raw = substr( $this->raw , 2 );
return $return;
}

function getLong() {
$lo = (ord($this->raw[1]) << 8) | ord($this->raw[0]);
$hi = (ord($this->raw[3]) << 8) | ord($this->raw[2]);
$this->raw = substr( $this->raw , 4 );
return ($hi << 16) | $lo;
}

function getFloat() {
$lo = (ord($this->raw[1]) << 8) | ord($this->raw[0]);
$hi = (ord($this->raw[2]) << 8) | ord($this->raw[3]);
$this->raw = substr( $this->raw , 4 );
return ($hi << 16) | $lo;
}

function getString() {
$str = "";
$i = 0;
$n = strlen( $this->raw );
while( ( $this->raw[$i] != "\0" ) && ( $i < $n ) ) {
$str .= $this->raw[$i];
$i++;
}
$this->raw = substr( $this->raw , strlen( $str ) + 1);
return $str;
}

function getInfo() {
if( !$this->connected )
return false;
$return = array();
fwrite( $this->resource, "\xFF\xFF\xFF\xFFTSource Engine Query\0" );
fread( $this->resource, 4 );
$status = socket_get_status( $this->resource );
if( $status['unread_bytes'] > 0 ) {
$this->raw = fread( $this->resource, $status['unread_bytes'] );
$tmp = $this->getByte();
if( $tmp == 0x6d ) {
$this->getString();
$return['name'] = $this->getString();
$return['map'] = $this->getString();
$return['directory'] = $this->getString();
$return['desсriрtion'] = $this->getString();
$return['players'] = $this->getByte();
$return['max_players'] = $this->getByte();
$return['version'] = $this->getByte();
$this->getByte();
$tmp = chr( $this->getByte() );
if( $tmp == 'l' )
$return['os'] = 'Linux';
else
$return['os'] = 'Windows';
if( $this->getByte() == 0x01 )
$return['password'] = 'yes';
else
$return['password'] = 'no';
if( $this->getByte() == 0x01 ) {
$this->getString();
$this->getString();
$this->raw = substr( $this->raw, 11 );
}
if( $this->getByte() == 0x01 )
$return['secure'] = 'yes';
else
$return['secure'] = 'no';
$return['bots'] = $this->getByte();
} elseif( $tmp == 0x49 ) {
$return['version'] = $this->getByte();
$return['name'] = $this->getString();
$return['map'] = $this->getString();
$return['directory'] = $this->getString();
$return['desсriрtion'] = $this->getString();
$this->raw = substr( $this->raw, 2 );
$return['players'] = $this->getByte();
$return['max_players'] = $this->getByte();
$return['bots'] = $this->getByte();
$this->getByte();
$tmp = chr( $this->getByte() );
if( $tmp == 'l' )
$return['os'] = 'Linux';
else
$return['os'] = 'Windows';
if( $this->getByte() == 0x01 )
$return['password'] = 'yes';
else
$return['password'] = 'no';
if( $this->getByte() == 0x01 )
$return['secure'] = 'yes';
else
$return['secure'] = 'no';
}
} else {
$this->disconnect();
return false;
}
return $return;
}

function getPlayers() {
$return = array();
if( !$this->connected )
return $return;

fwrite( $this->resource, "\xFF\xFF\xFF\xFF\x55" . $this->getChallenge() );
fread( $this->resource, 4 );
$status = socket_get_status( $this->resource );
if( $status['unread_bytes'] > 0 ) {
$this->raw = fread( $this->resource, $status['unread_bytes'] );
if( $this->getByte() == 0x44 ) {
$num = $this->getByte();
for($i = 0; $i < $num; $i++ ) {
$tmp = $this->getByte();
$name = $this->getString();
$kills = $this->getLong();
$time = @unpack( "f1float", $this->raw );
$this->raw = substr( $this->raw, 4 );
$return[] = array(
'name' => $name,
'kills' => $kills,
'time' => gmdate( "H:i:s", (int)$time['float'] )
);
}
}
}
return $return;
}

function getChallenge() {
if( !$this->connected )
return false;
fwrite( $this->resource, "\xFF\xFF\xFF\xFF\x55\xFF\xFF\xFF\xFF" );
fread( $this->resource, 5 );
return fread( $this->resource, 4 );
}

function getRules() {
$return = array();
if( !$this->connected )
return $return;

fwrite( $this->resource, "\xFF\xFF\xFF\xFF\x56" . $this->getChallenge() );
fread( $this->resource, 13 );
$status = socket_get_status( $this->resource );
if( $status['unread_bytes'] > 0 ) {
$this->raw = fread( $this->resource, $status['unread_bytes'] );
if( $this->getByte() == 0x45 ) {
$this->getShort();
$arr = explode( "\0", $this->raw );
$num = count( $arr );
for( $i = 0; $i < $num ; $i++ )
$return[$arr[$i]] = $arr[++$i];
}
}
return $return;
}
}

$info = new ServerInfo();
$info->connect( "game.ua", 27018 );
print_r( $info->getInfo() );
print_r( $info->getPlayers() );
print_r( $info->getRules() );
$info->disconnect();
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Boo
сообщение 28.11.2010, 10:31
Сообщение #7


Стаж: 17 лет

Сообщений: 468
Благодарностей: 22
Полезность: 73

Спасибо конечто, но такую дрянь пишет:

Код
Array ( [name] => War3FT :: server [map] => cs_militia [directory] => cstrike [desсriрtion] => Counter-Strike [players] => 0 [max_players] => 22 [version] => 47 [os] => Linux [password] => no [secure] => no [bots] => 0 ) Array ( ) Array ( )


Цитата(Xtrimal @ 14.11.2010, 14:31) *
Если не знаете то не отвечайте
https://forum.lightmon.ru/topic65.html
Вот тут посмотри. Я думаю под себя его несложно переделать.

Там надапокупать скрипт какой-то sad.gif Выложи плиз сюда...
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
cs-portal
сообщение 28.11.2010, 11:26
Сообщение #8
Стаж: 16 лет

Сообщений: 8181
Благодарностей: 2709
Полезность: 0

уже давно есть пропатченные вебмоды без уязвимостей
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя pike
сообщение 28.11.2010, 15:37
Сообщение #9


Стаж: 18 лет

Сообщений: 956
Благодарности: выкл.

Цитата(bookkc @ 28.11.2010, 10:31) *
Спасибо конечто, но такую дрянь пишет:

Код
Array ( [name] => War3FT :: server [map] => cs_militia [directory] => cstrike [desсriрtion] => Counter-Strike [players] => 0 [max_players] => 22 [version] => 47 [os] => Linux [password] => no [secure] => no [bots] => 0 ) Array ( ) Array ( )

Это не дрянь а информация с сервера.
Ты же просил скрипт а не готовый код со стилем.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Flesh
сообщение 28.11.2010, 19:10
Сообщение #10


Стаж: 17 лет

Сообщений: 319
Благодарностей: 168
Полезность: 776

Создаем players.php
CODE
<?php
error_reporting(0);
require_once("protocol.php");

$pizza = $_GET['ip'];
$pieces = explode(":", $pizza);
unset($get_type);

{
$get_type = 'halflife';

if($server_ip == $pieces[0] && $server_port == $pieces[1])
{
$get_type = $server_type;
}
}

if(!$get_type) { $err = "Детальная статистика сервера не может быть показана"; }
$player_list = query($pieces[0], $pieces[1], $get_type, "players");
if(!$player_list) { $err .= "<div style='text-align:center'>Нет игроков для показа</div>"; }

if (isset($player_list[1]['score']) ) { $lgsl_show_score = 1; }
if (isset($player_list[1]['deaths'])) { $lgsl_show_deaths = 1; }
if (isset($player_list[1]['skill'])) { $lgsl_show_skill = 1; }
if (isset($player_list[1]['goal'])) { $lgsl_show_goal = 1; }
if (isset($player_list[1]['honor'])) { $lgsl_show_honor = 1; }
if (isset($player_list[1]['leader'])) { $lgsl_show_leader = 1; }
if (isset($player_list[1]['ping']) ) { $lgsl_show_ping = 1; }
if (isset($player_list[1]['team']) ) { $lgsl_show_team = 1; }
if (isset($player_list[1]['stats']) ) { $lgsl_show_stats = 1; }
if (isset($player_list[1]['time']) ) { $lgsl_show_time = 1; }
if (isset($player_list[1]['skin'])) { $lgsl_show_skin = 1; }
if (isset($player_list[1]['rate'])) { $lgsl_show_rate = 1; }

echo "
<link rel='stylesheet' type='text/css' href='/templates/font/frame.css'>
<center><table class='brd' border='0'><tr>";

echo "<td class='brd' style='text-align:center'><b>Ник</b><br /><br /></td>";

if ($lgsl_show_score ) { echo "<td class='brd' style='width:60px; text-align:center'><b>Счет</b><br /><br /></td>"; }
if ($lgsl_show_deaths) { echo "<td style='width:60px; text-align:center'><b>Смертей</b><br /><br /></td>"; }
if ($lgsl_show_skill) { echo "<td style='width:60px; text-align:center'><b>Убийств</b><br /><br /></td>"; }
if ($lgsl_show_goal) { echo "<td style='width:60px; text-align:center'><b>Goal</b><br /><br /></td>"; }
if ($lgsl_show_honor) { echo "<td style='width:60px; text-align:center'><b>Honor</b><br /><br /></td>"; }
if ($lgsl_show_leader) { echo "<td style='width:60px; text-align:center'><b>Leader</b><br /><br /></td>"; }
if ($lgsl_show_ping) { echo "<td style='width:60px; text-align:center'><b>Пинг</b><br /><br /></td>"; }
if ($lgsl_show_team) { echo "<td style='width:60px; text-align:center'><b>Team</b><br /><br /></td>"; }
if ($lgsl_show_stats) { echo "<td style='width:60px; text-align:center'><b>Статистика</b><br /><br /></td>"; }
if ($lgsl_show_time) { echo "<td class='brd' style='width:90px; text-align:center'><b>Время</b><br /><br /></td>"; }
if ($lgsl_show_skin) { echo "<td style='width:90px; text-align:center'><b>Skin</b><br /><br /></td>"; }
if ($lgsl_show_rate) { echo "<td style='width:90px; text-align:center'><b>Rate</b><br /><br /></td>"; }
if ($lgsl_show_hash) { echo "<td style='width:90px; text-align:center'><b>Key Hash </b><br /><br /></td>"; }
if ($lgsl_show_pid) { echo "<td style='width:90px; text-align:center'><b>Player ID</b><br /><br /></td>"; }

echo "</tr>";

foreach ($player_list as $key => $player)
{
$player['name'] = htmlentities($player['name'], ENT_QUOTES);

echo "<tr><td class='brd'>".$player['name']."</td>";
if ($lgsl_show_score) {echo "<td class='brd' align='center'>$player[score]</td>"; }
if ($lgsl_show_deaths) { echo "<td align='center'>$player[deaths]</td>"; }
if ($lgsl_show_skill) { echo "<td align='center'>$player[skill]</td>"; }
if ($lgsl_show_goal) { echo "<td align='center'>$player[goal]</td>"; }
if ($lgsl_show_honor) { echo "<td align='center'>$player[honor]</td>"; }
if ($lgsl_show_leader) { echo "<td align='center'>$player[leader]</td>"; }
if ($lgsl_show_ping) { echo "<td align='center'>$player[ping]</td>"; }
if ($lgsl_show_team) { echo "<td align='center'>$player[team]</td>"; }
if ($lgsl_show_stats) { echo "<td align='center'>$player[stats]</td>"; }
if ($lgsl_show_time) { echo "<td class='brd' align='center'>$player[time]</td>"; }
if ($lgsl_show_skin) { echo "<td align='center'>$player[skin]</td>"; }
if ($lgsl_show_rate) { echo "<td align='center'>$player[rate]</td>"; }
if ($lgsl_show_hash) { echo "<td align='center'>$player[keyhash]</td>"; }
if ($lgsl_show_pid) { echo "<td align='center'>$player[pid]</td>"; }

echo "</tr>";
}

echo "</table></center>";
?>


Создаем protocol.php
CODE
<?php
function get($request, $ip, $port, $game)
{

$support = array("halflife" => "Counter-Strike");

$protocol = array("halflife" => "cs");

$launch = array("halflife" => "hl://");

if ($request == "support") { return $support; }
if ($request == "protocol") { return $protocol; }

if ($request == "launch")
{
if ($ip != "" && $port != "" && $game != "")
{

$launch = $launch[$game].$ip.":".$port;
}

return $launch;
}
}


function query($ip, $port, $game, $request)
{

$feed_url = "";

$protocol = get("protocol","","","");

if (!$protocol[$game])
{
echo "Неизвестная ошибка"; exit;
}

if ($request != "info" && $request != "settings" && $request != "players")
{
echo "INVALID TYPE ( info, settings, players )"; exit;
}

//---------------------------------------------------------+

if ($feed_url)
{
$data = query_feed($ip, $port, $game, $request, $feed_url);

$protocol[$game] = "feed";
}

//-------------------------+

function check_cs($server,$port) {
$out = array();
$qw=chr(32);
$fp = fsockopen ("udp://".$server,$port);
if (!$fp)
{
$out[1]="";
$out[2]="";
$out[3]="";
$out[4]="";
$out[5]="";
$out[6]="";
$out[7]="";
}
else {
fwrite($fp,"\xFF\xFF\xFF\xFF\x54\x53\x6F\x75\x72\x63\x65\x20\x45\x6E\x67\x69\x6E\x65\x20\x51\x75\x65\x72\x79\x00".chr(10));
$start=time();
socket_set_timeout($fp,1);
$st=fread($fp,1);
$r=socket_get_status($fp);
$r=$r["unread_bytes"];
if ($r!=0) {
$st.=fread($fp,$r);
fclose($fp);
$st=substr($st,4);
if ($st[0]=="\x49") {$st=substr($st,2);$source=true;} //проверка на Source
else {$st=SubStr($st,StrPos($st,chr(0))+1);$source=false;} //если не Source

$a[0]=SubStr($st,0,StrPos($st,chr(0))); $st=SubStr($st,StrPos($st,chr(0))+1);
$a[1]=SubStr($st,0,StrPos($st,chr(0))); $st=SubStr($st,StrPos($st,chr(0))+1);
$a[2]=SubStr($st,0,StrPos($st,chr(0))); $st=SubStr($st,StrPos($st,chr(0))+1); //не нужен
$a[3]=SubStr($st,0,StrPos($st,chr(0))); $st=SubStr($st,StrPos($st,chr(0))+1);
if ($source) {
$ll=0;
while ($ll<100) {
$a[4]=ord(SubStr($st,0,1));
$a[5]=ord(SubStr($st,1,1));
if (SubStr($st,3,1)=="\x64") {$ll=1000;}
$st=SubStr($st,1);
$ll++;
}

} else {
$a[4]=ord(SubStr($st,0,1));
$a[5]=ord(SubStr($st,1,1)); }
}
$out[1]=$a[0]; //название
$out[2]=$server;
$out[3]=$port;
$out[4]=$a[1]; //карта
$out[5]=$a[4]; //играют
$out[6]=$a[5]; //max
$out[7]=$a[3]; //game
//if (isset($addd)) {$out[8]=$addd;} else {$out[8]='';} //adrr
}

return $out;
}

//-------------------------+

if ($protocol[$game] == "cs")
{
$data = query_cs($ip, $port, $game, $request);
}

if ($request == "info")
{
$data[status] = TRUE;
$data[ip] = $ip;
$data[port] = $port;
$data[gametype] = $game;

$data[gamemod] = str_replace(" ", "", $data[gamemod]);
$data[gamemod] = trim(strtolower($data[gamemod]));
$data[mapname] = trim(strtolower($data[mapname]));

if (!trim($data[gamemod])) { $data[gamemod] = $game; }
if (!trim($data[password])) { $data[password] = FALSE; }
if (strtolower($data[password]) == "false") { $data[password] = FALSE; }
if (strtolower($data[password]) == "true") { $data[password] = TRUE; }

if (!trim($data[hostname]) || !trim($data[mapname]))
{
$data[status] = FALSE;
$data[players] = 0;
$data[maxplayers] = 0;
}
}

return $data;
}

function query_cs($ip, $port, $game, $request)
{

$fp = @fsockopen("udp://".$ip, $port, $errno, $errstr, 1);

if (!$fp) { return FALSE; }

stream_set_timeout($fp, 1, 0); stream_set_blocking($fp, true);

if (($request == "settings" || $request == "players") && $game != "halflifeold")
{
$getchallengenumber = "\xFF\xFF\xFF\xFF\x57";

fwrite($fp, $getchallengenumber);

$tmp = fread($fp, 4096);

$challengenumber = substr($tmp, 5, 4);
}

if ($game == "halflife")
{
if ($request == "info") { $challenge = "\xFF\xFF\xFF\xFFTSource Engine Query\x00"; }
if ($request == "players") { $challenge = "\xFF\xFF\xFF\xFFU".$challengenumber; }
if ($request == "settings") { $challenge = "\xFF\xFF\xFF\xFFV".$challengenumber; }
}


fwrite($fp, $challenge);

$buffer = fread($fp, 4096);

if (!$buffer) { fclose($fp); return FALSE; }

if ($request == "settings")
{
$second_packet = fread($fp, 4096);

if (strlen($second_packet) > 0)
{
$reverse_check = dechex(ord($buffer[8]));

if ($reverse_check[0] == "1")
{
$tmp = $buffer;
$buffer = $second_packet;
$second_packet = $tmp;
}

$buffer = substr($buffer, 13);
$second_packet = substr($second_packet, 9);
$buffer = trim($buffer.$second_packet);
}
else
{
$buffer = trim(substr($buffer, 4));
}
}
else
{
$buffer = trim(substr($buffer, 4));
}

fclose($fp);

if (!trim($buffer)) { return FALSE; }

if ($request == "info")
{
unset($data);

$tmp = explode("\x00", $buffer);

$place = strlen($tmp[0].$tmp[1].$tmp[2].$tmp[3].$tmp[4]) + 5;

$data['gamemod'] = $tmp[3];
$data['hostname'] = $tmp[1];
$data['mapname'] = $tmp[2];
$data['players'] = ord($buffer[$place]);
$data['maxplayers'] = ord($buffer[$place + 1]);
$data['password'] = ord($buffer[$place + 5]);
$data['datatype'] = $buffer[0]; // m for steam info
$data['version'] = ord($buffer[$place + 2]); // Network Version
$data['description'] = $tmp[4];
$data['server_type'] = $buffer[$place + 3]; // D edicated or L isten
$data['server_os'] = $buffer[$place + 4]; // W indows or L inux
$data['server_secure'] = ord($tmp[14]); // VAC
$data['server_bots'] = ord($tmp[15]); // Number of Bots
return $data;
}

if ($request == "players")
{

$player_number = 0;
$position = 2;

do
{
$player_number++;

$player[$player_number][id] = ord($buffer[$position]);
$position ++;

while($buffer[$position] != "\x00" && $position < 500)
{
$player[$player_number][name] .= $buffer[$position];
$position ++;
}

$player[$player_number][score] = (ord($buffer[$position + 1]))
+ (ord($buffer[$position + 2]) * 256)
+ (ord($buffer[$position + 3]) * 65536)
+ (ord($buffer[$position + 4]) * 16777216);

if ($player[$player_number][score] > 2147483648) { $player[$player_number][score] -= 4294967296; }

$time = substr($buffer, $position + 5, 4);
if (strlen($time) < 4) { return FALSE; }
list(,$time) = unpack("f", $time);
$time = mktime(0, 0, $time);
$player[$player_number][time] = date("H:i:s", $time);

$position += 9;
}
while ($position < strlen($buffer));

return $player;
}


if ($request == "settings")
{

$tmp = substr($buffer, 2);
$rawdata = explode("\x00", $tmp);

for($i=1; $i<count($rawdata); $i=$i+2)
{
$rawdata[$i] = strtolower($rawdata[$i]);
$setting[$rawdata[$i]] = $rawdata[$i+1];
}

return $setting;
}

//---------------------------------------------------------+
}

function query_feed($ip, $port, $game, $request, $feed_url)
{
$host = parse_url($feed_url);

if (!$host[path]) { echo "INCOMPLETE FEED URL SET"; exit; }

$host[path] .= "?ip=$ip&port=$port&gametype=$game&request=$request";

//---------------------------------------------------------+

$fp = @fsockopen($host[host], "80", $errno, $errstr, 1);

if (!$fp)
{
$data[status] = TRUE;
$data[hostname] = $host[host].$host[path];
$data[mapname] = "Offline";
$data[players] = 0;
$data[maxplayers] = 0;
return $data;
}

stream_set_timeout($fp, 1, 0); stream_set_blocking($fp, true); // SET TIMEOUT FOR OFFLINE SERVERS

$html_request = "GET $host[path] HTTP/1.0\r\n";
$html_request .= "Host: $host[host]\r\n";
$html_request .= "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204\r\n";
$html_request .= "Accept: text/xml,application/xml,application/xhtml+xml,";
$html_request .= "text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,";
$html_request .= "image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1\r\n";
$html_request .= "Accept-Language: en-us, en;q=0.50\r\n";
$html_request .= "Accept-Encoding: \r\n";
$html_request .= "Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66\r\n";
$html_request .= "Referer: ".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']."\r\n";
$html_request .= "Cache-Control: max-age=0\r\n";
$html_request .= "Connection: Close\r\n\r\n";

fwrite($fp, $html_request);

unset($html_raw);

while (!feof($fp))
{
$html_raw .= fread($fp, 1024);
}

fclose($fp);

//---------------------------------------------------------+

$tmp = explode("_LGSL_FEED_", $html_raw);

if (!$tmp[1]) { echo "Feed Missing From: $host[host]$host[path] Returned: $html_raw"; exit; }

$data = unserialize($tmp[1]);

return $data;
}
?>
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя new_forward
сообщение 17.4.2013, 18:54
Сообщение #11


Стаж: 15 лет

Сообщений: 2
Благодарностей: 1
Полезность: 0

Flesh,
Работает только для серверов с портом вида 27015 другие порты не работают (((


http://trackerok.com
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Revelation
сообщение 17.4.2013, 19:04
Сообщение #12
Стаж: 13 лет

Сообщений: 1051
Благодарностей: 401
Полезность: 1075

new_forward, Информация устаревшая, сейчас есть более новые совершенствованные методы вывода
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя new_forward
сообщение 17.4.2013, 19:54
Сообщение #13


Стаж: 15 лет

Сообщений: 2
Благодарностей: 1
Полезность: 0

Цитата(Revelation @ 17.4.2013, 20:04) *
new_forward, Информация устаревшая, сейчас есть более новые совершенствованные методы вывода


Например , подскажите...


http://trackerok.com
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
  Тема закрытаНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: