@ -2,13 +2,14 @@
 
			
		
	
		
		
			
				
					
						require __DIR__ . '/SourceQuery/SourceQuery.class.php';
	require __DIR__ . '/SourceQuery/SourceQuery.class.php';
 
			
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						// Edit this ->
	// Edit this ->
 
			
		
	
		
		
			
				
					
						define( 'SQ_SERVER_ADDR', 'gs2.my-run.de ' );
	define( 'SQ_SERVER_ADDR', 'localhost ' );
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
						define( 'SQ_SERVER_PORT', 27015 );
	define( 'SQ_SERVER_PORT', 27015 );
 
			
		
	
		
		
			
				
					
						define( 'SQ_TIMEOUT',     1 );
	define( 'SQ_TIMEOUT',     1 );
 
			
		
	
		
		
			
				
					
						define( 'SQ_ENGINE',      SourceQuery :: SOURCE );
	define( 'SQ_ENGINE',      SourceQuery :: SOURCE );
 
			
		
	
		
		
			
				
					
						// Edit this < - 
	// Edit this < - 
 
			
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						$Timer = MicroTime( true );
	$Timer = MicroTime( true );
 
			
		
	
		
		
			
				
					
						
 
			
		
	
		
		
			
				
					
						$Query = new SourceQuery( );
	$Query = new SourceQuery( );
 
			
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						$Info    = Array( );
	$Info    = Array( );
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -29,6 +30,8 @@
 
			
		
	
		
		
			
				
					
						}
	}
 
			
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						$Query->Disconnect( );
	$Query->Disconnect( );
 
			
		
	
		
		
			
				
					
						
 
			
		
	
		
		
			
				
					
						$Timer = Number_Format( MicroTime( true ) - $Timer, 4, '.', '' );
 
			
		
	
		
		
			
				
					
					?>
?>
 
			
		
	
		
		
			
				
					
					<!DOCTYPE html> <!DOCTYPE html>  
			
		
	
		
		
			
				
					
					< html > < html >  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -36,48 +39,48 @@
 
			
		
	
		
		
			
				
					
						< meta  charset = "utf-8" > 
	< meta  charset = "utf-8" > 
 
			
		
	
		
		
			
				
					
						< title > Source Query PHP Class< / title > 
	< title > Source Query PHP Class< / title > 
 
			
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						< link  rel = "stylesheet"  href = "http:// twitter.github.com/bootstrap/assets/css/bootstrap .css"> 
	< link  rel = "stylesheet"  href = "http:// netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min .css"> 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
						< style  type = "text/css" > 
	< style  type = "text/css" > 
 
			
		
	
		
		
			
				
					
							footer {
		.jumbotron {
 
			
				
				
			
		
	
		
		
			
				
					
								padding: 30px 0;
			margin-top: 30px;
 
			
				
				
			
		
	
		
		
			
				
					
								margin-top: 60px;
			border-radius: 0;
 
			
				
				
			
		
	
		
		
			
				
					
								border-top: 1px solid #E5E5E5;
 
			
		
	
		
		
			
				
					
								background-color: whiteSmoke;
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
							}
		}
 
			
		
	
		
		
			
				
					
							footer p {
		
 
			
				
				
			
		
	
		
		
			
				
					
								margin-bottom: 0;
		.table thead th {
 
			
				
				
			
		
	
		
		
			
				
					
								color: #777;
			background-color: #428BCA;
 
			
				
				
			
		
	
		
		
			
				
					
							}
			border-color: #428BCA !important;
 
			
				
				
			
		
	
		
		
			
				
					
							.page-header h1 {
			color: #FFF;
 
			
				
				
			
		
	
		
		
			
				
					
								font-size: 60px;
 
			
		
	
		
		
			
				
					
								font-weight: 200;
 
			
		
	
		
		
			
				
					
								line-height: 1;
 
			
		
	
		
		
			
				
					
								letter-spacing: -1px;
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
							}
		}
 
			
		
	
		
		
			
				
					
						< / style > 
	< / style > 
 
			
		
	
		
		
			
				
					
					< / head > < / head >  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					< body > < body >  
			
		
	
		
		
			
				
					
					    < div  class = "container" > 
    < div  class = "container" > 
 
			
		
	
		
		
			
				
					
					    	< div  class = "page-header  "> 		< div  class = "jumbotron  ">  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
								< h1 > Source Query PHP Class< / h1 > 
			< h1 > Source Query PHP Class< / h1 > 
 
			
		
	
		
		
			
				
					
								
 
			
		
	
		
		
			
				
					
								< p > This class was created to query game server which use the Source query protocol, this includes all source games, half-life 1 engine games and Call of Duty: Modern Warfare 3< / p > 
 
			
		
	
		
		
			
				
					
								
 
			
		
	
		
		
			
				
					
								< p > 
 
			
		
	
		
		
			
				
					
									< a  class = "btn btn-large btn-primary"  href = "http://xpaw.ru" > Made by xPaw< / a > 
 
			
		
	
		
		
			
				
					
									< a  class = "btn btn-large btn-primary"  href = "https://github.com/xPaw/PHP-Source-Query-Class" > View on GitHub< / a > 
 
			
		
	
		
		
			
				
					
									< a  class = "btn btn-large btn-danger"  href = "http://creativecommons.org/licenses/by-nc-sa/3.0/" > CC BY-NC-SA 3.0< / a > 
 
			
		
	
		
		
			
				
					
								< / p > 
 
			
		
	
		
		
			
				
					
							< / div > 
		< / div > 
 
			
		
	
		
		
			
				
					
					
		  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					<?php  if (  isset (  $Exception  )  ) :  ?> <?php  if (  isset (  $Exception  )  ) :  ?>  
			
		
	
		
		
			
				
					
							< div  class = "alert alert-error" > 
		< div  class = "panel panel-primary" > 
 
			
				
				
			
		
	
		
		
			
				
					
								< h4  class = "alert-heading" > <?php  echo  Get_Class (  $Exception  );  ?>  at line <?php  echo  $Exception -> getLine (  );  ?> </ h4 > 
			< div  class = "panel-heading" > <?php  echo  Get_Class (  $Exception  );  ?>  at line <?php  echo  $Exception -> getLine (  );  ?> </ div > 
 
			
				
				
			
		
	
		
		
			
				
					
								<?php  echo  htmlspecialchars (  $Exception -> getMessage (  )  );  ?> 
			< p >< b > <?php  echo  htmlspecialchars (  $Exception -> getMessage (  )  );  ?> </ b ></ p > 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
								< p > <?php  echo  nl2br (  $e -> getTraceAsString (),  false  );  ?> </ p > 
 
			
		
	
		
		
			
				
					
							< / div > 
		< / div > 
 
			
		
	
		
		
			
				
					
							
 
			
		
	
		
		
			
				
					
							< h3 > Stack trace< / h3 > 
 
			
		
	
		
		
			
				
					
							< pre > <?php  echo  $e -> getTraceAsString ();  ?> </ pre > 
 
			
		
	
		
		
			
				
					
					<?php  else :  ?> <?php  else :  ?>  
			
		
	
		
		
			
				
					
							< div  class = "row" > 
		< div  class = "row" > 
 
			
		
	
		
		
			
				
					
								< div  class = " span 6"> 
			< div  class = "col-sm-6" > 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
									< table  class = "table table-bordered table-striped" > 
				< table  class = "table table-bordered table-striped" > 
 
			
		
	
		
		
			
				
					
										< thead > 
					< thead > 
 
			
		
	
		
		
			
				
					
											< tr > 
						< tr > 
 
			
		
	
		
		
			
				
					
												< th  colspan = "2" < th > 
							< th  colspan = "2"   < em >(queried in <?php  echo  $Timer ;  ?> s)</ em ><  /th > 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
											< / tr > 
						< / tr > 
 
			
		
	
		
		
			
				
					
										< / thead > 
					< / thead > 
 
			
		
	
		
		
			
				
					
										< tbody > 
					< tbody > 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -99,11 +102,15 @@
 
			
		
	
		
		
			
				
					
					?>< / td > 
?>< / td > 
 
			
		
	
		
		
			
				
					
											< / tr > 
						< / tr > 
 
			
		
	
		
		
			
				
					
					<?php  endforeach ;  ?> <?php  endforeach ;  ?>  
			
		
	
		
		
			
				
					
					<?php  else :  ?>  
			
		
	
		
		
			
				
					
											< tr > 
 
			
		
	
		
		
			
				
					
												< td  colspan = "2" > No information received< / td > 
 
			
		
	
		
		
			
				
					
											< / tr > 
 
			
		
	
		
		
			
				
					
					<?php  endif ;  ?> <?php  endif ;  ?>  
			
		
	
		
		
			
				
					
										< / tbody > 
					< / tbody > 
 
			
		
	
		
		
			
				
					
									< / table > 
				< / table > 
 
			
		
	
		
		
			
				
					
								< / div > 
			< / div > 
 
			
		
	
		
		
			
				
					
								< div  class = " span 6"> 
			< div  class = " col-sm- 6"> 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
									< table  class = "table table-bordered table-striped" > 
				< table  class = "table table-bordered table-striped" > 
 
			
		
	
		
		
			
				
					
										< thead > 
					< thead > 
 
			
		
	
		
		
			
				
					
											< tr > 
						< tr > 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -119,7 +126,7 @@
 
			
		
	
		
		
			
				
					
					<?php  endforeach ;  ?> <?php  endforeach ;  ?>  
			
		
	
		
		
			
				
					
					<?php  else :  ?> <?php  else :  ?>  
			
		
	
		
		
			
				
					
											< tr > 
						< tr > 
 
			
		
	
		
		
			
				
					
												< td > No players in da house! < / td > 
							< td > No players in da house< / td > 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
											< / tr > 
						< / tr > 
 
			
		
	
		
		
			
				
					
					<?php  endif ;  ?> <?php  endif ;  ?>  
			
		
	
		
		
			
				
					
										< / tbody > 
					< / tbody > 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -127,8 +134,8 @@
 
			
		
	
		
		
			
				
					
								< / div > 
			< / div > 
 
			
		
	
		
		
			
				
					
							< / div > 
		< / div > 
 
			
		
	
		
		
			
				
					
							< div  class = "row" > 
		< div  class = "row" > 
 
			
		
	
		
		
			
				
					
								< div  class = " span 12"> 
			< div  class = " col-sm- 12"> 
 
			
				
				
			
		
	
		
		
			
				
					
									< table  class = "table table- condensed table- bordered table-striped"> 
				< table  class = "table table- bordered table-striped"> 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
										< thead > 
					< thead > 
 
			
		
	
		
		
			
				
					
											< tr > 
						< tr > 
 
			
		
	
		
		
			
				
					
												< th  colspan = "2" > Rules< / th > 
							< th  colspan = "2" > Rules< / th > 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -149,14 +156,5 @@
 
			
		
	
		
		
			
				
					
							< / div > 
		< / div > 
 
			
		
	
		
		
			
				
					
					<?php  endif ;  ?> <?php  endif ;  ?>  
			
		
	
		
		
			
				
					
						< / div > 
	< / div > 
 
			
		
	
		
		
			
				
					
						
 
			
		
	
		
		
			
				
					
						< footer > 
 
			
		
	
		
		
			
				
					
							< div  class = "container" > 
 
			
		
	
		
		
			
				
					
								< p  class = "pull-right" > Generated in < span  class = "badge badge-success" > <?php  echo  Number_Format (  (  MicroTime (  true  )  -  $Timer  ),  4 ,  '.' ,  ''  );  ?> s</ span ></ p > 
 
			
		
	
		
		
			
				
					
								
 
			
		
	
		
		
			
				
					
								< p > Made by < a  href = "http://xpaw.ru"  target = "_blank" > xPaw< / a > , source code available on < a  href = "https://github.com/xPaw/PHP-Source-Query-Class"  target = "_blank" > GitHub< / a > < / p > 
 
			
		
	
		
		
			
				
					
								< p > Code licensed under the < a  href = "http://creativecommons.org/licenses/by-nc-sa/3.0/"  target = "_blank" > CC BY-NC-SA 3.0< / a > < / p > 
 
			
		
	
		
		
			
				
					
							< / div > 
 
			
		
	
		
		
			
				
					
						< / footer > 
 
			
		
	
		
		
			
				
					
					< / body > < / body >  
			
		
	
		
		
			
				
					
					< / html > < / html >