Thursday, January 28, 2016

Running WhatsApp With PHP

Now you can integrated whatsApp with your website/ script. Here the tutorial:

  • Download Scripts From https://github.com/mgp25/Chat-API
  • Install Requirement 1: https://github.com/allegro/php-protobuf
  • Install Requirement 2: https://github.com/mgp25/curve25519-php
  • Install Requirement 3: sudo apt-get install sqlite php5-sqlite

After you download Requirement 1 and 2, here the installation of both:
cd to each directory, then chmod -R 777 on that directory
phpize
./configure
makesudo make install


Then Add Both Extention to Apache/Cli On PHP

echo -e "; configuration for php curve25519 module\nextension=curve25519.so"| sudo tee -a /etc/php5/apache2/conf.d/curve25519.ini

echo -e "; configuration for php curve25519 module\nextension=curve25519.so"| sudo tee -a /etc/php5/cli/conf.d/curve25519.ini

echo -e "; configuration for php protobuf module\nextension=protobuf.so"| sudo tee -a /etc/php5/apache2/conf.d/protobuf.ini

echo -e "; configuration for php protobuf module\nextension=protobuf.so"| sudo tee -a /etc/php5/cli/conf.d/protobuf.ini

sudo service restart apache2


Now You can run scripts WhatsApp From PHP

To Register New Number, Use: /Chat-API-master/examples/registerTool.php

To Try All Of Feature, Use: /Chat-API-master/examples/WA CLI Client/client.php




Good Luck !!!

1 comments:

Post a Comment