title: Getting error while trying to connect to a node server in php using elephantIO
body: <p>I am trying to connect to a node server using ElephantIO in php</p>
  
  <p>Here is the code</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL);
  ini_set('display_errors','On');
  
      use ElephantIO\Client,
          ElephantIO\Engine\SocketIO\Version1X,
          ElephantIO\Exception\ServerConnectionFailureException;
  
      require __DIR__ . '/vendor/autoload.php';
  
      $client = new Client(new Version1X('http://localhost:3001'));
  
      try
      {
          $client-&gt;initialize();
          $client-&gt;emit('new_order', ['foo' =&gt; 'bar']);
          $client-&gt;close();
      }
      catch (ServerConnectionFailureException $e)
      {
          echo $e;
      }
  </code></pre>
  
  <p>And i am getting an error on connection</p>
  
  <pre><code>ElephantIO\Exception\ServerConnectionFailureException: An error occurred while trying to establish a connection to the server in /var/www/html/Socket/vendor/wisembly/elephant.io/src/Engine/SocketIO/Version1X.php:167 Stack trace: #0 /var/www/html/Socket/vendor/wisembly/elephant.io/src/Engine/SocketIO/Version1X.php(48): ElephantIO\Engine\SocketIO\Version1X-&gt;handshake() #1 /var/www/html/Socket/vendor/wisembly/elephant.io/src/Client.php(60): ElephantIO\Engine\SocketIO\Version1X-&gt;connect() #2 /var/www/html/Socket/emit_test.php(47): ElephantIO\Client-&gt;initialize() #3 {main}
  </code></pre>