title: Elasticsearch PHP connection settings for searchly.com
body: <p>I have difficulties connecting to searchly.com with elasticsearch-php (<a href="http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/" rel="nofollow">http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/</a>)</p>
  
  <pre><code>$params = array();
      $params['hosts'] = array (
          'https://site:{my-key}@balin-eu-west-1.searchly.com:80'
      );
  
      $client = new Client($params);
  
      $em = $this-&gt;getContainer()-&gt;get('doctrine')-&gt;getManager();
      $movies = $em-&gt;getRepository("CineupsWebAppBundle:Movie")
          -&gt;getTitlesWithSlug();
  
      $params = array('index' =&gt; 'movies');
      foreach($movies as $movie)
      {
          $params['body'][] = array(
              'title' =&gt; $movie['title'],
              'titleDe' =&gt; $movie['titleDe'],
              'slugDe' =&gt; $movie['slugDe']
          );break;
      }
  
      $responses = $client-&gt;bulk($params);
  </code></pre>
  
  <p>with port 80 I get:</p>
  
  <pre><code>  [Elasticsearch\Common\Exceptions\TransportException]                 
    error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
  </code></pre>
  
  <p>without:</p>
  
  <pre><code>  [Elasticsearch\Common\Exceptions\Curl\CouldNotConnectToHost]                       
    Failed to connect to balin-eu-west-1.searchly.com port 9200: Connection timed out
  </code></pre>
  
  <p>tried connection with curl (put new index)</p>
  
  <pre><code>curl -XPUT http://site:{my-key}@balin-eu-west-1.searchly.com/articles
  </code></pre>
  
  <p>it works  </p>
  
  <p>It seems that I miss some settings for connection, but no idea what :(</p>