Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php // +---------------------------------------------------------------------- // | WeC..
Decoded Output download
<?php
// +----------------------------------------------------------------------
// | WeChatDeveloper
// +----------------------------------------------------------------------
// | 2014~2024 ThinkAdmin [ thinkadmin.top ]
// +----------------------------------------------------------------------
// | : https://thinkadmin.top
// +----------------------------------------------------------------------
// | ( https://mit-license.org )
// | ( https://thinkadmin.top/disclaimer )
// +----------------------------------------------------------------------
// | gitee https://gitee.com/zoujingli/WeChatDeveloper
// | github https://github.com/zoujingli/WeChatDeveloper
// +----------------------------------------------------------------------
namespace WeChat;
use WeChat\Contracts\BasicWeChat;
use WeChat\Contracts\Tools;
/**
*
* Class Custom
* @package WeChat
*/
class Custom extends BasicWeChat
{
/**
*
* @param string $kf_account
* @param string $nickname
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function addAccount($kf_account, $nickname)
{
$url = "https://api.weixin.qq.com/customservice/kfaccount/add?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['kf_account' => $kf_account, 'nickname' => $nickname]);
}
/**
*
* @param string $kfAccount
* @param string $nickname
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function updateAccount($kfAccount, $nickname)
{
$url = "https://api.weixin.qq.com/customservice/kfaccount/update?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['kf_account' => $kfAccount, 'nickname' => $nickname]);
}
/**
*
* @param string $kfAccount
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function deleteAccount($kfAccount)
{
$url = "https://api.weixin.qq.com/customservice/kfaccount/del?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['kf_account' => $kfAccount]);
}
/**
*
* @param string $kfAccount @
* @param string $invite_wx
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function inviteWorker($kfAccount, $invite_wx)
{
$url = 'https://api.weixin.qq.com/customservice/kfaccount/inviteworker?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['kf_account' => $kfAccount, 'invite_wx' => $invite_wx]);
}
/**
*
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function getAccountList()
{
$url = "https://api.weixin.qq.com/cgi-bin/customservice/getkflist?access_token=ACCESS_TOKEN";
return $this->callGetApi($url);
}
/**
*
* @param string $kf_account
* @param string $image
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function uploadHeadimg($kf_account, $image)
{
$url = "https://api.weixin.qq.com/customservice/kfaccount/uploadheadimg?access_token=ACCESS_TOKEN&kf_account={$kf_account}";
return $this->callPostApi($url, ['media' => Tools::createCurlFile($image)], false);
}
/**
* -
* @param array $data
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function send(array $data)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data);
}
/**
*
* @param string $openid openid
* @param string $command Typing:,CancelTyping:
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function typing($openid, $command = 'Typing')
{
$url = "https://api.weixin.qq.com/cgi-bin/message/custom/typing?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['touser' => $openid, 'command' => $command]);
}
/**
*
* @param array $data
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massSendAll(array $data)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data);
}
/**
* OpenID
* @param array $data
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massSend(array $data)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data);
}
/**
*
* @param integer $msg_id ID
* @param null|integer $article_idx 10
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massDelete($msg_id, $article_idx = null)
{
$data = ['msg_id' => $msg_id];
is_null($article_idx) || $data['article_idx'] = $article_idx;
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/delete?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data);
}
/**
*
* @param array $data
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massPreview(array $data)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data);
}
/**
*
* @param integer $msgId id
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massGet($msgId)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/get?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['msg_id' => $msgId]);
}
/**
*
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massGetSeed()
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/speed/get?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, []);
}
/**
*
* @param integer $speed
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massSetSeed($speed)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/speed/set?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['speed' => $speed]);
}
} ?>
Did this file decode correctly?
Original Code
<?php
// +----------------------------------------------------------------------
// | WeChatDeveloper
// +----------------------------------------------------------------------
// | 2014~2024 ThinkAdmin [ thinkadmin.top ]
// +----------------------------------------------------------------------
// | : https://thinkadmin.top
// +----------------------------------------------------------------------
// | ( https://mit-license.org )
// | ( https://thinkadmin.top/disclaimer )
// +----------------------------------------------------------------------
// | gitee https://gitee.com/zoujingli/WeChatDeveloper
// | github https://github.com/zoujingli/WeChatDeveloper
// +----------------------------------------------------------------------
namespace WeChat;
use WeChat\Contracts\BasicWeChat;
use WeChat\Contracts\Tools;
/**
*
* Class Custom
* @package WeChat
*/
class Custom extends BasicWeChat
{
/**
*
* @param string $kf_account
* @param string $nickname
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function addAccount($kf_account, $nickname)
{
$url = "https://api.weixin.qq.com/customservice/kfaccount/add?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['kf_account' => $kf_account, 'nickname' => $nickname]);
}
/**
*
* @param string $kfAccount
* @param string $nickname
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function updateAccount($kfAccount, $nickname)
{
$url = "https://api.weixin.qq.com/customservice/kfaccount/update?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['kf_account' => $kfAccount, 'nickname' => $nickname]);
}
/**
*
* @param string $kfAccount
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function deleteAccount($kfAccount)
{
$url = "https://api.weixin.qq.com/customservice/kfaccount/del?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['kf_account' => $kfAccount]);
}
/**
*
* @param string $kfAccount @
* @param string $invite_wx
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function inviteWorker($kfAccount, $invite_wx)
{
$url = 'https://api.weixin.qq.com/customservice/kfaccount/inviteworker?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['kf_account' => $kfAccount, 'invite_wx' => $invite_wx]);
}
/**
*
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function getAccountList()
{
$url = "https://api.weixin.qq.com/cgi-bin/customservice/getkflist?access_token=ACCESS_TOKEN";
return $this->callGetApi($url);
}
/**
*
* @param string $kf_account
* @param string $image
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function uploadHeadimg($kf_account, $image)
{
$url = "https://api.weixin.qq.com/customservice/kfaccount/uploadheadimg?access_token=ACCESS_TOKEN&kf_account={$kf_account}";
return $this->callPostApi($url, ['media' => Tools::createCurlFile($image)], false);
}
/**
* -
* @param array $data
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function send(array $data)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data);
}
/**
*
* @param string $openid openid
* @param string $command Typing:,CancelTyping:
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function typing($openid, $command = 'Typing')
{
$url = "https://api.weixin.qq.com/cgi-bin/message/custom/typing?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['touser' => $openid, 'command' => $command]);
}
/**
*
* @param array $data
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massSendAll(array $data)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data);
}
/**
* OpenID
* @param array $data
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massSend(array $data)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data);
}
/**
*
* @param integer $msg_id ID
* @param null|integer $article_idx 10
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massDelete($msg_id, $article_idx = null)
{
$data = ['msg_id' => $msg_id];
is_null($article_idx) || $data['article_idx'] = $article_idx;
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/delete?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data);
}
/**
*
* @param array $data
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massPreview(array $data)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data);
}
/**
*
* @param integer $msgId id
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massGet($msgId)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/get?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['msg_id' => $msgId]);
}
/**
*
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massGetSeed()
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/speed/get?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, []);
}
/**
*
* @param integer $speed
* @return array
* @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException
*/
public function massSetSeed($speed)
{
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/speed/set?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['speed' => $speed]);
}
}
Function Calls
None |
Stats
MD5 | 2179f72ad6d93d902fdba60b01a0d11c |
Eval Count | 0 |
Decode Time | 97 ms |