yama/newwaapi-php-lib

This is library for newwaapi https://github.com/yama24/newwaapi

1.2.2 2024-08-17 15:58 UTC

This package is auto-updated.

Last update: 2024-12-17 16:45:33 UTC


README

This is PHP library for newwaapi

This version of library related to newwaapi latest release

Installation

Install with composer

  composer require yama/newwaapi-php-lib

Usage/Examples

<?php

require_once __DIR__ . "/vendor/autoload.php";

use Yama\NewwaapiPhpLib\Newwaapi;

$wa = new Newwaapi("http://localhost:8000/");

for information of connection

echo $wa->info();

for send message to contact

echo $wa->sendMessage('6281292267204', 'example message');

for send message to group

echo $wa->sendGroupMessage('628986182128-1627374981@g.us', 'example group message');

for send media to contact or group

echo $wa->sendMedia('6281292267204', "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/WhatsApp.svg/479px-WhatsApp.svg.png", 'example media caption', '');

for check the number is registered on WhatsApp or not

echo $wa->isRegistered('6281292267204');

for get the list of groups

echo $wa->getGroups();

for get the list of config

echo $wa->getConfig();

Please check this out