mirror of
https://github.com/xPaw/PHP-Source-Query.git
synced 2026-07-14 11:04:49 +02:00
Compare commits
7 Commits
4f88fb0c76
...
2.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 673e572233 | |||
| 7c8e5add77 | |||
| fbabd440da | |||
| bbb6c4c23e | |||
| 9da781a993 | |||
| b4601cdf86 | |||
| 7231921b0b |
+5
-7
@@ -17,6 +17,7 @@
|
|||||||
$Info = Array( );
|
$Info = Array( );
|
||||||
$Rules = Array( );
|
$Rules = Array( );
|
||||||
$Players = Array( );
|
$Players = Array( );
|
||||||
|
$Exception = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -87,13 +88,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<?php if( isset( $Exception ) ): ?>
|
<?php if( $Exception !== null ): ?>
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-error">
|
||||||
<div class="panel-heading"><?php echo Get_Class( $Exception ); ?> at line <?php echo $Exception->getLine( ); ?></div>
|
<pre class="panel-body"><?php echo htmlspecialchars( $Exception->__toString( ) ); ?></pre>
|
||||||
<p><b><?php echo htmlspecialchars( $Exception->getMessage( ) ); ?></b></p>
|
|
||||||
<p><?php echo nl2br( $e->getTraceAsString(), false ); ?></p>
|
|
||||||
</div>
|
</div>
|
||||||
<?php else: ?>
|
<?php endif; ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
@@ -193,7 +192,6 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
# PHP Source Query
|
# PHP Source Query
|
||||||
|
|
||||||
[](https://travis-ci.com/xPaw/PHP-Source-Query)
|
|
||||||
[](https://coveralls.io/github/xPaw/PHP-Source-Query)
|
|
||||||
[](https://packagist.org/packages/xpaw/php-source-query-class)
|
[](https://packagist.org/packages/xpaw/php-source-query-class)
|
||||||
[](https://packagist.org/packages/xpaw/php-source-query-class)
|
[](https://packagist.org/packages/xpaw/php-source-query-class)
|
||||||
|
|
||||||
|
|||||||
@@ -200,12 +200,28 @@
|
|||||||
throw new SocketException( 'Not connected.', SocketException::NOT_CONNECTED );
|
throw new SocketException( 'Not connected.', SocketException::NOT_CONNECTED );
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" );
|
if( $this->Challenge )
|
||||||
$Buffer = $this->Socket->Read( );
|
{
|
||||||
|
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" . $this->Challenge );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" );
|
||||||
|
}
|
||||||
|
|
||||||
|
$Buffer = $this->Socket->Read( );
|
||||||
$Type = $Buffer->GetByte( );
|
$Type = $Buffer->GetByte( );
|
||||||
$Server = [];
|
$Server = [];
|
||||||
|
|
||||||
|
if( $Type === self::S2A_CHALLENGE )
|
||||||
|
{
|
||||||
|
$this->Challenge = $Buffer->Get( 4 );
|
||||||
|
|
||||||
|
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" . $this->Challenge );
|
||||||
|
$Buffer = $this->Socket->Read( );
|
||||||
|
$Type = $Buffer->GetByte( );
|
||||||
|
}
|
||||||
|
|
||||||
// Old GoldSource protocol, HLTV still uses it
|
// Old GoldSource protocol, HLTV still uses it
|
||||||
if( $Type === self::S2A_INFO_OLD && $this->Socket->Engine === self::GOLDSOURCE )
|
if( $Type === self::S2A_INFO_OLD && $this->Socket->Engine === self::GOLDSOURCE )
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-2
@@ -23,8 +23,7 @@
|
|||||||
"require-dev":
|
"require-dev":
|
||||||
{
|
{
|
||||||
"phpunit/phpunit": "9.2",
|
"phpunit/phpunit": "9.2",
|
||||||
"vimeo/psalm": "^3.12",
|
"vimeo/psalm": "^3.12"
|
||||||
"php-coveralls/php-coveralls": "^2.2"
|
|
||||||
},
|
},
|
||||||
"autoload":
|
"autoload":
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user