PHP cURL请求正在显示加载屏幕

时间:2018-12-03 07:27:05

标签: php web-scraping php-curl

我正在尝试使用PHP cURL抓取该网站https://www.virustotal.com/#/ip-address/50.116.24.15。但是我没有数据。我只看到一个加载屏幕。如何绕过此加载屏幕? 这是我的代码:

<?php 

 $url = 'https://www.virustotal.com/#/ip-address/50.116.24.15';
 $htm = getCurlData($url);
 echo $htm;

function getCurlData($url)
{
     $ch = curl_init($url);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
     $contents = curl_exec($ch);
     curl_close($ch);
     return $contents;
}

 ?>

0 个答案:

没有答案