Html,curl and file_get_contents are not captured, but the page can be opened directly.
Html,curl and file_get_contents are not captured, but the page can be opened directly.
Ask
The URL is as follows
https:/count.taobao.com/counter3?keys=sm_368_dsr-1097280647,iccp_1_522177046867&callback=jsonp107
Why can't I catch the content, it's always empty
------to solve the idea----------------------
$ch = Curl_init ();
$url = ' https://count.taobao.com/counter3?keys=SM_368_dsr-1097280647,ICCP_1_522177046867&callback=jsonp107 ';
curl_setopt ($ch, Curlopt_url, $url);
curl_setopt ($ch, Curlopt_returntransfer, 1);
curl_setopt ($ch, Curlopt_ssl_verifypeer, 0);
curl_setopt ($ch, curlopt_ssl_verifyhost,0);
curl_setopt ($ch, Curlopt_header, 0);
$output = curl_exec ($ch);
Curl_close ($ch);
echo $output;
------to solve the idea----------------------
Take it and play it.
$jsonp =file_get_contents (' https://count.taobao.com/counter3?keys=SM_368_dsr-1097280647,ICCP_1_522177046867 &callback=jsonp107 ');
$jsonp = ' jsonp107 ({"sm_368_dsr-1097280647": {v:0,nv:100,m_ufb:0,m:4.89661,m_g:20.15,s_ufb:0,s:4.8744,s_g:31.49,c _ufb:0,c:4.87867,c_g:39.55,gp:100.00,ss:290159,hdr:true}, "iccp_1_522177046867": 4915});
Preg_match_all ('/\d{1,}}/', $jsonp, $arr);
echo Trim ($arr [0][0], '} ');