VirusTotal API(php)始终返回0

VirusTotal API(php)始终返回0,php,api,Php,Api,我想使用VirusTotal作为他们在网站上的写作方式 <?php $virustotal_api_key = '9491e275f708f55b0777b495411556c916afdda7255d4614500d4aed27175001'; $scan_url = 'https://www.google.com/'; $post = array('apikey' => $virustotal_api_key,'url'=> $scan_url); $ch = curl_

我想使用VirusTotal作为他们在网站上的写作方式

<?php
$virustotal_api_key = '9491e275f708f55b0777b495411556c916afdda7255d4614500d4aed27175001';
$scan_url = 'https://www.google.com/';

$post = array('apikey' => $virustotal_api_key,'url'=> $scan_url);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.virustotal.com/vtapi/v2/url/scan');
curl_setopt($ch, CURLOPT_POST, True);
curl_setopt($ch, CURLOPT_VERBOSE, 1); // remove this if your not debugging
curl_setopt($ch, CURLOPT_RETURNTRANSFER ,True);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

$result=curl_exec ($ch);
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
print("status = $status_code\n");
if ($status_code == 200) { // OK
  $js = json_decode($result, true);
  print_r($js);
} else {  // Error occured
  print($result);
}
curl_close ($ch);
?>

但我总是将错误返回为:

状态=0

我已经搜索了很多,但仍然没有找到任何东西

如果你能帮助我,我将不胜感激。
tnx.

我已经找出了问题所在。 这是因为他们的网站禁止我的国家(伊朗)IP。 我从早上到中午都在浪费时间来发现这一点:(:(


我应该搜索其他类似的内容。

你的代码对我来说很好。我得到
状态=200
和一个数组响应,包括
扫描请求成功排队,如果我不得不猜测,请稍后回来查看报告
,然后我会说你不是。@JeffPuckettII tnx非常感谢你的帮助。