whatsapp api在上传到服务器时无法正常工作

I am using whatsapp api on my web site when I was using it locally it works but when I uploaded my web site to the server it stops working and here is the responde from whatsapp server

<stream:features>
tx    <readreceipts></readreceipts>
tx    <groups_v2></groups_v2>
tx    <privacy></privacy>
tx    <presence></presence>
tx  </stream:features>

tx  <auth mechanism="WAUTH-2" user="961xxxxxxx"></auth>

I then execute the code that ask for the verification number and the password from the server but I got the same result the php code for sending the message is :

$password="XXXXXXXXXXX";

$userPhone="961XXXXXXXX";
$userIdentity="hello";
$debug=true;

$phone="961XXXXXXX";
$w = new WhatsProt($userPhone, $userIdentity, $debug);

$w->Connect();

$w->loginWithPassword($password);


$w->sendMessage($phone , $msg);

what would the problem be ?