yama/mywaapi-php-lib 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yama/mywaapi-php-lib

最新稳定版本:1.1.0

Composer 安装命令:

composer require yama/mywaapi-php-lib

包简介

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

README 文档

README

This is PHP library for mywaapi

Installation

Install with composer

  composer require yama/mywaapi-php-lib

Usage/Examples

<?php

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

use Yama\MywaapiPhpLib\Mywaapi;

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

for send message to contact

echo $wa->sendMessage('6281292267204', 'example message');
Parameter Type Description
number string Required. 6281292267204
message string Required. example message

for information of connection

echo $wa->info();

for check the number is registered or not

echo $wa->isRegistered("6281292267204");
Parameter Type Description
number string Required. 6281292267204

for set the webhook/callback

echo $wa->setWebhook("https://webhook.site/365b1f55-5334-48e0-8380-91443516515b");
Parameter Type Description
url string Required. webhook url

for get the webhook/callback

echo $wa->getWebhook();

for send media to contact or group

echo $wa->sendMedia('6281292267204', 'example media caption', "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/WhatsApp.svg/479px-WhatsApp.svg.png");
Parameter Type Description
numberOrGroupId string Required. 6281292267204 (you can use a number or group id)
caption string example media caption (you can fill with empty string)
file string Required. (you can fill it with base64 url data)

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 clear all message in the chat

echo $wa->clearMessage('6281292267204');
Parameter Type Description
numberOrGroupId string Required. 6281292267204 (you can use a number or group id)

for delete chat

echo $wa->deleteChat('6281292267204');
Parameter Type Description
numberOrGroupId string Required. 6281292267204 (you can use a number or group id)

Please check this out

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-11