php正则问题,求解
我想把 找到23条结果的23数字提取出来 请问怎么写啊,我这样写的代码报错Warning: file_get_contents(https://s.wanfangdata.com.cn/): failed to open stream: HTTP request failed! HTTP/1.1 426 Upgrade Required in
<?php
$stream_opts = [
"ssl" => [
"verify_peer"=>false,
"verify_peer_name"=>false,
]
];
$key="电脑";
$key=urlencode($key);
$url = "https://s.wanfangdata.com.cn/paper?q=$key";
$result = file_get_contents($url,false,stream_context_create($stream_opts));
echo $result; 不就是正则匹配数字么,/\d+/不就行了
页:
[1]