I am new to whatsApp API implementation in my project and I downloaded whatsapp API . I used ajaxDemo and installed the following code in my file, but it does not work and gives an internal error
in the socket.php
file.
index.php
<?php session_start(); $_SESSION["running"] = time(); $_SESSION["inbound"] = array(); $_SESSION["outbound"] = array(); $target = "+91**********";
socket.php
require_once '../whatsprot.class.php'; //I got error this two lines $target = @$_POST["target"]; $username = "+91**********"; //My whatsapp account number $password = "*********"; //static password $w = new WhatsProt($username, 0, "WhatsApi AJAX Demo", true); $w->eventManager()->bind("onGetImage", "onGetImage"); $w->eventManager()->bind("onGetProfilePicture", "onGetProfilePicture"); $w->connect(); $w->loginWithPassword($password);
I think there is a problem connecting to the socket.php
file.
Please tell me where the problem really is in my code?
source share