mirror of
https://github.com/xPaw/PHP-Source-Query.git
synced 2026-07-14 07:54: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( );
|
||||
$Rules = Array( );
|
||||
$Players = Array( );
|
||||
$Exception = null;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -87,13 +88,11 @@
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<?php if( isset( $Exception ) ): ?>
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading"><?php echo Get_Class( $Exception ); ?> at line <?php echo $Exception->getLine( ); ?></div>
|
||||
<p><b><?php echo htmlspecialchars( $Exception->getMessage( ) ); ?></b></p>
|
||||
<p><?php echo nl2br( $e->getTraceAsString(), false ); ?></p>
|
||||
<?php if( $Exception !== null ): ?>
|
||||
<div class="panel panel-error">
|
||||
<pre class="panel-body"><?php echo htmlspecialchars( $Exception->__toString( ) ); ?></pre>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php endif; ?>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-bordered table-striped">
|
||||
@@ -193,7 +192,6 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# 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)
|
||||
|
||||
|
||||
@@ -200,12 +200,28 @@
|
||||
throw new SocketException( 'Not connected.', SocketException::NOT_CONNECTED );
|
||||
}
|
||||
|
||||
$this->Socket->Write( self::A2S_INFO, "Source Engine Query\0" );
|
||||
if( $this->Challenge )
|
||||
{
|
||||
$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( );
|
||||
$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
|
||||
if( $Type === self::S2A_INFO_OLD && $this->Socket->Engine === self::GOLDSOURCE )
|
||||
{
|
||||
|
||||
+1
-2
@@ -23,8 +23,7 @@
|
||||
"require-dev":
|
||||
{
|
||||
"phpunit/phpunit": "9.2",
|
||||
"vimeo/psalm": "^3.12",
|
||||
"php-coveralls/php-coveralls": "^2.2"
|
||||
"vimeo/psalm": "^3.12"
|
||||
},
|
||||
"autoload":
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user