title: Parse error: syntax error, unexpected '.1' (T_DNUMBER) in C:\webserver\function\GrabStatus.php on line 7
body: <p>I'm getting the error</p>
  
  <pre><code>Parse error: syntax error, unexpected '.1' (T_DNUMBER) in C:\webserver\function\GrabStatus.php on line 7
  </code></pre>
  
  <p>in my websites php minecraft server ping script</p>
  
  <p>Here's the code I'm using:</p>
  
  <pre><code>&lt;?php
  $settings = parse_ini_file('../db.ini',true);
  
  $ipandport = explode(':',$settings['mcserver']['ip']);
  if(empty($ipandport[1]))
  {
  $ipandport[1] = 192.168.1.33:27747;
  }
  
  // Edit this -&gt;
  define( 'MQ_SERVER_ADDR', $ipandport[0]);
  define( 'MQ_SERVER_PORT', $ipandport[1]);
  define( 'MQ_TIMEOUT', 1 );
  // Edit this &lt;-
  
  // Display everything in browser, because some people can't look in logs for errors
  Error_Reporting( E_ALL | E_STRICT );
  Ini_Set( 'display_errors', true );
  
  require __DIR__ . '/MinecraftServerPing.php';
  
  $Timer = MicroTime( true );
  
  $Info = false;
  $Query = null;
  
  try
  {
      $Query = new MinecraftPing( MQ_SERVER_ADDR, MQ_SERVER_PORT, MQ_TIMEOUT );
  
      $Info = $Query-&gt;Query( );
  
      if( $Info === false )
      {
          /*
           * If this server is older than 1.7, we can try querying it again using older protocol
           * This function returns data in a different format, you will have to manually map
           * things yourself if you want to match 1.7's output
           *
           * If you know for sure that this server is using an older version,
           * you then can directly call QueryOldPre17 and avoid Query() and then reconnection part
           */
  
          $Query-&gt;Close( );
          $Query-&gt;Connect( );
  
          $Info = $Query-&gt;QueryOldPre17( );
      }
  }
  catch( MinecraftPingException $e )
  {
      $Exception = $e;
  }
  
  if( $Query !== null )
  {
      $Query-&gt;Close( );
  }
  
  $Timer = Number_Format( MicroTime( true ) - $Timer, 4, '.', '' );
  
  
  
  if(isset($Info['players']))
  {
  
  echo $Info['description'].'&lt;Br&gt;';
  echo 'Players: '.$Info['players']['online'].' / '.$Info['players']['max'].'&lt;br&gt;';
  echo 'Ping: '.$Timer;
  echo '&lt;br&gt;&lt;br&gt;';
  
  }
  else
  {
  echo 'Server is offline.';
  }
  ?&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>