title: How to send message from WhatsApp in PHP with WhatsAPI Official?
body: <p>I'm trying to use the WhatsApi Official library to send a message via WhatsApp from a php file. I've moved in my Apache web server the library, in a folder call test, like this:</p>
  
  <p><img src="https://i.stack.imgur.com/31B9b.png" alt="enter image description here"></p>
  
  <p>The file whatsapp.php is this one:</p>
  
  <pre><code>    &lt;?php
      require_once './src/whatsprot.class.php';
      $username = "1XXXXXXXXX";
      $password = "password";
      $w = new WhatsProt($username, "0", "My Nickname", true); //Name your application by replacing “WhatsApp Messaging”
      $w-&gt;connect();
      $w-&gt;loginWithPassword($password);
      $target = '1xxxxxxxxx'; //Target Phone,reciever phone
      $message = 'This is my messagge';
      $w-&gt;SendPresenceSubscription($target); //Let us first send presence to user
      $w-&gt;sendMessage($target,$message ); // Send Message
      echo "Message Sent Successfully";
  ?&gt;
  </code></pre>
  
  <p>I'm facing some problem with the library new WhatsProt(), which blocks all the code (may be sockets ?). </p>
  
  <p>So my question is, how can I fix this problem ? If no, are there any other solution to send message from a pho script ?</p>