yama/newwaapi-php-lib
最新稳定版本:1.2.4
Composer 安装命令:
composer require yama/newwaapi-php-lib
包简介
This is library for newwaapi https://github.com/yama24/newwaapi
README 文档
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');
| Parameter | Type | Description |
|---|---|---|
number |
string |
Required. 6281292267204 |
message |
string |
Required. example message |
for send message to group
echo $wa->sendGroupMessage('628986182128-1627374981@g.us', 'example group message');
| Parameter | Type | Description |
|---|---|---|
id |
string |
Required. 628986182128-1627374981@g.us |
message |
string |
Required. 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', '');
| Parameter | Type | Description |
|---|---|---|
number |
string |
Required. 6281292267204 (you can use a number or group id) |
file |
string |
Required. (you can fill it with base64 url data / url) |
caption |
string |
example media caption (you can fill with empty string) |
name |
string |
example document file name (work for document file, you can fill with empty string) |
for check the number is registered on WhatsApp or not
echo $wa->isRegistered('6281292267204');
| Parameter | Type | Description |
|---|---|---|
number |
string |
Required. 6281292267204 |
for get the list of groups
echo $wa->getGroups();
for get the list of config
echo $wa->getConfig();
Please check this out
统计信息
- 总下载量: 482
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-04