23 lines
499 B
PHP
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'));
|
|
}
|
|
|
|
} |