Navigacija

Vartotojų tinkle

Prisijungusių svečių: 83
Prisijungusių narių: 0
Prisijungusių narių nėra

Registruoti nariai: 25,957
Naujausias narys: keistuole

Naujausi straipsniai

Paskutiniai nariai

Bruksnys 5 dienos
Darexs 3 savaitės
Nepas 3 savaitės
keistuole 6 savaitės
Gizmis 7 savaitės
Reikalas 7 savaitės
Rytis17 savaitės
MaFetas21 savaitės
ozzWANTED22 savaitės
saulyzas24 savaitės
TOMIJUS25 savaitės
Jaunelis40 savaitės
lanis41 savaitės
And2s42 savaitės
Memento Mori46 savaitės
Quwqkibor49 savaitės
asirija53 savaitės
tomeem55 savaitės
weberiz58 savaitės
mRokass60 savaitės

Informacija:


OS: Unknown
Naršyklė: Nežinoma
IP: 3.144.101.157
Naujienų: 529
Straipsnių: 235
Temų: 52,589
Postų: 522,539
Postų pask. parą: 0
Shout'ų pask. parą: 0
P.S.C. pask. parą: 0
Nuorodų kataloge: 13

Lankomumo Statistika

Peržiūrų šiandien: 22

Iš viso peržiūrų: 22948724

Prisijungti

REGISTRUOTIS
Nario vardas

Slaptažodis



Pamiršai slaptažodį?
Paprašyk naujo

Aktyvuoti save

Šaukykla

Jei norite rašyti žinutes, turite prisijungti.

Nepas
2025 Bal. 9 17:04:13
drovus

Nepas
2025 Bal. 9 17:04:08
drovus

Gizmis
2025 Kov. 15 14:03:50
OMG, smagu matyt sita puslapi veikianti

ozzWANTED
2024 Lap. 30 15:11:14
Taip, vis dar up šypsosi

MaFetas
2024 Lap. 13 22:11:57
hey how, geras dar veikiantis saitas?

Šaukyklos archyvas

Apklausa

Ar esate patenkinti lietuviško vertimo kokybe?

Taip!

Taip, bet yra ką taisyti (parašysiu komentaruose)

Ne

Norėdamas balsuoti turite prisijungti.
Archyvas
Reklama 400x60
Serverio monitorius HELP !!!
Forumas | Modai, įskiepiai, panelės (PHP-FUSION) | Mods, Panels & Infusions

Autorius: smikizzs Peržiūrų: 1109      Spausdinti temą
2010 Vas. 28 10:02:07          1 žinutė iš 2
Spausdinti pranešimą
Pas mane yra problema as turiu tik tokia panele:
http://www.phpfusion.lt/sa-mp-se...klamu,p518
Paveiksliukas: http://www.part.lt/perziura/efd7...b72804.jpg

Bet man reikia kad butu tokia: http://www.part.lt/perziura/2c00...f27611.jpg
Suprantat man reik kad butu galima nuleisti ir paziureti kitus.
Prasau padekite
Irasykite cia koda labai prasau

stai panele: http://www.phpfusion.lt/sa-mp-se...klamu,p518

<?php

$serverIP = "193.46.83.161";
$serverPort = 8005;

try
{
        $rQuery = new QueryServer( $serverIP, $serverPort );
        $aInformation  = $rQuery->GetInfo( );
        $aServerRules  = $rQuery->GetRules( );
        $aBasicPlayer  = $rQuery->GetPlayers( );
        $aTotalPlayers = $rQuery->GetDetailedPlayers( );
        $serverIP = "193.46.83.161";
        $serverPort = 8005;

        $rQuery->Close( );
}
catch (QueryServerException $pError)
{
       echo 'Serveris išjungtas';
}

if(isset($aInformation) && is_array($aInformation)){
?>
    <table width="250" align="center">
            <tr>
                    <td style='color:#cc0000'>Pavadinimas:</td>
                    <td style='color:#000000'><?php echo htmlentities($aInformation['Hostname']); ?></td>
            </tr>
            <tr>
                    <td style='color:#cc0000'>Modas</td>
                    <td style='color:#000000'><?php echo htmlentities($aInformation['Gamemode']); ?></td>
            </tr>
            <tr>
                    <td style='color:#cc0000'>Žaidejai</td>
                    <td style='color:#000000'><?php echo $aInformation['Players']; ?> / <?php echo $aInformation['MaxPlayers']; ?></td>
            </tr>
            <tr>
                    <td style='color:#cc0000'>Žemelapis</td>
                    <td style='color:#000000'><?php echo htmlentities($aInformation['Map']); ?></td>
            </tr>
                    <td style='color:#cc0000'>iP:</td>
                    <td style='color:#000000'><?php echo $serverIP; ?> : <?php echo $serverPort; ?></td>
            <tr>
                    <td style='color:#cc0000'>Oras</td>
                    <td style='color:#000000'><?php echo $aServerRules['weather']; ?></td>
            </tr>
            <tr>
                    <td style='color:#cc0000'>Laikas</td>
                    <td style='color:#000000'><?php echo $aServerRules['worldtime']; ?></td>
            </tr>
            <tr>
                    <td style='color:#cc0000'>Versija</td>
                    <td style='color:#000000'><?php echo $aServerRules['version']; ?></td>
            </tr>

            <tr>

 

            </tr>
   

    </table>

    <br />
    <?php
    if(!is_array($aTotalPlayers) || count($aTotalPlayers) == 0){
            echo '<br /><i>Niekas nežaidžia</i>';
    } else {
    ?>
                     <table width="250" align="center">
               <tr>
                       <td style='color:#33cc66'><b>ID</b></td>
                       <td style='color:#000000'><b>Žaidejas</b></td>
                       <td style='color:#cc0000'><b>XP</b></td>
               </tr>
       <?php
       foreach($aTotalPlayers AS $id => $value){
       ?>
               <tr>
                       <td style='color:#33cc66'><?php echo $value['PlayerID']; ?></td>
                       <td style='color:#000000'><?php echo htmlentities($value['Nickname']); ?></td>
                       <td style='color:#cc0000'><?php echo $value['Score']; ?></td>
               </tr>
       <?php
       }
   
       echo '</table>';
   }
}

class QueryServer
{
    private $szServerIP;
    private $iPort;
    private $rSocketID;

    private $bStatus;

    function __construct( $szServerIP, $iPort )
    {
            $this->szServerIP = $this->VerifyAddress( $szServerIP );
            $this->iPort = $iPort;

            if (empty( $this->szServerIP ) || !is_numeric( $iPort )) {
                    throw new QueryServerException( 'Either the ip-address or the port isn\'t filled in correctly.' );
            }

            $this->rSocketID = @fsockopen( 'udp://' . $this->szServerIP, $iPort, $iErrorNo, $szErrorStr, 5 );
            if (!$this->rSocketID) {
                    throw new QueryServerException( 'Cannot connect to the server: ' . $szErrorStr );
            }

            socket_set_timeout( $this->rSocketID, 0, 500000 );
            $this->bStatus = true;
    }

    function VerifyAddress( $szServerIP )
    {
            if (ip2long( $szServerIP ) !== false &&
                long2ip( ip2long( $szServerIP ) ) == $szServerIP ) {
                    return $szServerIP;
            }

            $szAddress = gethostbyname( $szServerIP );
            if ($szAddress == $szServerIP) {
                    return "";
            }

            return $szAddress;
    }

    function SendPacket( $cPacket )
    {
            $szPacket = 'SAMP';
            $aIpChunks = explode( '.', $this->szServerIP );

            foreach( $aIpChunks as $szChunk ) {
                    $szPacket .= chr( $szChunk );
            }

            $szPacket .= chr( $this->iPort & 0xFF );
            $szPacket .= chr( $this->iPort >> 8 & 0xFF );
            $szPacket .= $cPacket;

            return fwrite( $this->rSocketID, $szPacket, strlen( $szPacket ) );
    }

    function GetPacket( $iBytes )
    {
            $iResponse = fread( $this->rSocketID, $iBytes );
            if ($iResponse === false) {
                    throw new QueryServerException( 'Connection to ' . $this->szServerIP . ' failed or has dropped.' );
            }

            $iLength = ord( $iResponse );
            if ($iLength > 0)
                    return fread( $this->rSocketID, $iLength );

            return "";
    }

    function Close( )
    {
            if ($this->rSocketID !== false) {
                    fclose( $this->rSocketID );
            }
    }

    function toInteger( $szData )
    {
            $iInteger = 0;

            $iInteger += ( ord( @$szData[ 0 ] ) );
            $iInteger += ( ord( @$szData[ 1 ] ) << 8 );
            $iInteger += ( ord( @$szData[ 2 ] ) << 16 );
            $iInteger += ( ord( @$szData[ 3 ] ) << 24 );

            if( $iInteger >= 4294967294 )
                    $iInteger -= 4294967296;

            return $iInteger;
    }


    function GetInfo( )
    {
            if ($this->SendPacket('i') === false) {
                    throw new QueryServerException( 'Connection to ' . $this->szServerIP . ' failed or has dropped.' );
            }

            $szFirstData = fread( $this->rSocketID, 4 );
            if (empty( $szFirstData ) || $szFirstData != 'SAMP') {
                    throw new QueryServerException( 'The server at ' . $this->szServerIP . ' is not an SA-MP Server.' );
            }

            fread( $this->rSocketID, 7 );

            return array (
                    'Password'   =>   ord( fread( $this->rSocketID, 1 ) ),
                    'Players'    =>   $this->toInteger( fread( $this->rSocketID, 2 ) ),
                    'MaxPlayers' =>   $this->toInteger( fread( $this->rSocketID, 2 ) ),
                    'Hostname'   =>   $this->GetPacket( 4 ),
                    'Gamemode'   =>   $this->GetPacket( 4 ),
                    'Map'        =>   $this->GetPacket( 4 )
            );
    }

    function GetRules( )
    {
            if ($this->SendPacket('r') === false) {
                    throw new QueryServerException( 'Connection to ' . $this->szServerIP . ' failed or has dropped.' );
            }

            // Pop the first 11 bytes from the response;
            fread( $this->rSocketID, 11 );

            $iRuleCount = ord( fread( $this->rSocketID, 2 ) );
            $aReturnArray = array( );

            for( $i = 0; $i < $iRuleCount; $i ++ ) {
                    $szRuleName = $this->GetPacket( 1 );
                    $aReturnArray[ $szRuleName ] = $this->GetPacket( 1 );
            }

            return $aReturnArray;
    }

    function GetPlayers( )
    {
            if ($this->SendPacket('c') === false) {
                    throw new QueryServerException( 'Connection to ' . $this->szServerIP . ' failed or has dropped.' );
            }

            // Again, pop the first eleven bytes send;
            fread( $this->rSocketID, 11 );

            $iPlayerCount = ord( fread( $this->rSocketID, 2 ) );
            $aReturnArray = array( );

            for( $i = 0; $i < $iPlayerCount; $i ++ )
            {
                    $aReturnArray[ ] = array (
                            'Nickname' => $this->GetPacket( 1 ),
                            'Score'    => $this->toInteger( fread( $this->rSocketID, 4 ) )
                    );
            }

            return $aReturnArray;
    }

    function GetDetailedPlayers( )
    {
            if ($this->SendPacket('d') === false) {
                    throw new QueryServerException( 'Connection to ' . $this->szServerIP . ' failed or has dropped.' );
            }

            fread( $this->rSocketID, 11 );

            $iPlayerCount = ord( fread( $this->rSocketID, 2 ) );
            $aReturnArray = array( );

            for( $i = 0; $i < $iPlayerCount; $i ++ ) {
                    $aReturnArray[ ] = array(
                            'PlayerID'   =>  $this->toInteger( fread( $this->rSocketID, 1 ) ),
                            'Nickname'   =>  $this->GetPacket( 1 ),
                            'Score'      =>  $this->toInteger( fread( $this->rSocketID, 4 ) ),
                            'Ping'       =>  $this->toInteger( fread( $this->rSocketID, 4 ) )
                    );
            }

            return $aReturnArray;
    }

function RCON($rcon, $command)
    {
            echo 'Password '.$rcon.' with '.$command;
            if ($this->SendPacket('x '.$rcon.' '.$command) === false) {
                    throw new QueryServerException( 'Connection to ' . $this->szServerIP . ' failed or has dropped.' );
            }

            // Pop the first 11 bytes from the response;
            $aReturnArray = fread( $this->rSocketID, 11 );

            echo fread( $this->rSocketID, 11 );

            return $aReturnArray;
    }

}

class QueryServerException extends Exception
{

    private $szMessage;

    function __construct( $szMessage )
    {
            $this->szMessage = $szMessage;
    }

    function toString( )
    {
            return $this->szMessage;
    }
}

?>




2010 Kov. 9 08:03:58          2 žinutė iš 2
Spausdinti pranešimą
niekas nedarykit,nes jis tik nukopint nori...blogaiblogai

Užsuk! www.Gta-Sa.lt
Užsuk! www.Motoklubas.wu.lt
Peršokti į forumą: