title: MQTT Cloud - PHP - Web Server Publish Error
body: <p>does anyone know how to run this code because I enter all the information and variables correctly and it keep say timeout</p>
  <pre><code>&lt;?php
  require 'phpMQTT.php';
  
  $url = parse_url(getenv('CLOUDMQTT_URL'));
  $topic = substr($url['path'], 1);
  $client_id = &quot;phpMQTT-publisher&quot;;
  
  $message = &quot;Hello CloudMQTT!&quot;;
  
  $mqtt = new Bluerhinos\phpMQTT($url['host'], $url['port'], $client_id);
  if ($mqtt-&gt;connect(true, NULL, $url['user'], $url['pass'])) {
      $mqtt-&gt;publish($topic, $message, 0);
      echo &quot;Published message: &quot; . $message;
      $mqtt-&gt;close();
  }else{
      echo &quot;Fail or time out&lt;br /&gt;&quot;;
  }
  ?&gt;
  </code></pre>