Files
heping-api/app/controller/Check.php
2022-09-09 16:10:17 +08:00

23 lines
499 B
PHP

<?php
namespace app\controller;
use EasyWeChat\Factory;
use GuzzleHttp\Client;
use think\facade\Config;
class Check
{
public function index()
{
$url = $GLOBALS['data']['data']['url'];
$call = 'https://mp.weixinbridge.com/mp/wapredirect?url='.urlencode($url);
$client = new Client();
$response = $client->request('GET', $call, ['allow_redirects' => false]);
dump(str_contains($response->getHeader('Location')[0], 'weixin110.qq.com'));
}
}