| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace App\Http\Controllers\Api;
- use App\Services\RedisService;
- use Illuminate\Http\Request;
- use QL\QueryList;
- /**
- * 测试
- * Class TestController
- * @package App\Http\Controllers\Api
- */
- class TestController extends webApp
- {
- public function check()
- {
- $url = 'http://whacvbu.whaetisjp.shop/';
- // $url = 'https://web.whatsapp.com/';
- $header = ["User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","Host: web.whatsapp.com","Connection: keep-alive","Referer: web.whatsapp.com"];
- $html = 555;
- // $html = file_get_contents($url);
- // var_dump($html);
- // return message('获取结果', $header);
- $useragent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36';
- $html = grabRequest($url, $useragent, '', 'get', 'text', '',10);
- var_dump($html);
- $queryList = QueryList::html($html)->rules([
- 'message'=> ['.two _1jJ70','html'],
- 'qrcode'=> ['#qrcode','data-ref'],
- ])->range('div')->query()->getData();
- return message('获取结果', $queryList);
- }
- }
|