gpt4 book ai didi

php - 如何在 virustotal api v2 for php 中获取 div 命令结构化结果?

转载 作者:太空宇宙 更新时间:2023-11-03 18:43:19 26 4
gpt4 key购买 nike

我正在做一个元素 virustotal api v2我正在从这个网站下载 virustotalapiV2 http://www.ab-weblog.com/en/php-script-for-accessing-virustotal-api-version-2-0/ .我在我的系统中也有我的公钥和其他东西我正在使用带有 curl.virustotal api v2 的 wamp 服务器工作正常它获取 url 并正确传递但结果部分显示如下

stdClass Object(
[permalink] => https://www.virustotal.com/url/dd014af5ed6b38d9130e3f466f850e46d21b951199d53a18ef29ee9341614eaf/analysis/1370899172/
[url] => http://www.google.com/
[response_code] => 1
[scan_date] => 2013-06-10 21:19:32
[scan_id] => dd014af5ed6b38d9130e3f466f850e46d21b951199d53a18ef29ee9341614eaf-1370899172
[verbose_msg] => Scan finished, scan information embedded in this object
[filescan_id] =>
[positives] => 0
[total] => 39
[scans] => stdClass Object
(
[CLEAN MX] => stdClass Object
(
[detected] =>
[result] => clean site
)

[MalwarePatrol] => stdClass Object
(
[detected] =>
[result] => clean site
)

[ZDB Zeus] => stdClass Object
(
[detected] =>
[result] => clean site
)

[K7AntiVirus] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Quttera] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Yandex Safebrowsing] => stdClass Object
(
[detected] =>
[result] => clean site
)

[MalwareDomainList] => stdClass Object
(
[detected] =>
[result] => clean site
)

[ZeusTracker] => stdClass Object
(
[detected] =>
[result] => clean site
)

[zvelo] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Google Safebrowsing] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Kaspersky] => stdClass Object
(
[detected] =>
[result] => clean site
)

[BitDefender] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Opera] => stdClass Object
(
[detected] =>
[result] => clean site
)

[G-Data] => stdClass Object
(
[detected] =>
[result] => clean site
)

[C-SIRT] => stdClass Object
(
[detected] =>
[result] => clean site
)

[CyberCrime] => stdClass Object
(
[detected] =>
[result] => unrated site
)

[Sucuri SiteCheck] => stdClass Object
(
[detected] =>
[result] => clean site
)

[VX Vault] => stdClass Object
(
[detected] =>
[result] => clean site
)

[ADMINUSLabs] => stdClass Object
(
[detected] =>
[result] => clean site
)

[SCUMWARE.org] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Dr.Web] => stdClass Object
(
[detected] =>
[result] => clean site
)

[AlienVault] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Sophos] => stdClass Object
(
[detected] =>
[result] => unrated site
)

[Malc0de Database] => stdClass Object
(
[detected] =>
[result] => clean site
)

[SpyEyeTracker] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Phishtank] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Avira] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Antiy-AVL] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Comodo Site Inspector] => stdClass Object
(
[detected] =>
[result] => suspicious site
)

[Malekal] => stdClass Object
(
[detected] =>
[result] => clean site
)

[ESET] => stdClass Object
(
[detected] =>
[result] => clean site
)

[SecureBrain] => stdClass Object
(
[detected] =>
[result] => unrated site
)

[Websense ThreatSeeker] => stdClass Object
(
[detected] =>
[result] => clean site
)

[Netcraft] => stdClass Object
(
[detected] =>
[result] => clean site
)

[ParetoLogic] => stdClass Object
(
[detected] =>
[result] => clean site
)

[URLQuery] => stdClass Object
(
[detected] =>
[result] => unrated site
)

[Wepawet] => stdClass Object
(
[detected] =>
[result] => clean site
[detail] =>
)

[Fortinet] => stdClass Object
(
[detected] =>
[result] => unrated site
)

[Minotaur] => stdClass Object
(
[detected] =>
[result] => clean site
)

) )

但是我需要一个像这样使用 html 和 div 的正确方法

                                ResultsURL=www.google.com  Total Checking= 39                                                            Detected                  Result1.  CLEAN MX                               0                    Clean site2.  MalwarePatrol                          0                    Clean  site3.  (E.X)…………………………………… 

请帮助我完成我的元素。我会花很多很多时间通过互联网寻找解决方案,但没有适合我的解决方案。 :-( :-(

最佳答案

这就是您如何循环并打印出 stdClass 中的数据。如果你想让它更漂亮,你只需用 css 解决这个问题..

<table>
<tr><td><?php echo $result->url; ?></td></tr>
<tr><td><?php echo $result->total; ?></td></tr>
<?php
$none = 0;
$i = 0;
foreach($result->scans as $key => $val)
{
if($i==0) {
echo '<th></th>';
echo '<th></th>';
echo '<th>Detected</th>';
echo '<th>Result</th>';
}
echo '<tr>';
echo '<td>'.intval($i+1).'.</td>';
echo '<td>'.$key.'</td>';

if(empty($val->detected)):
echo '<td>'. $none .'</td>';
else:
echo '<td>'. $val->detected .'</td>';
endif;

echo '<td>'.$val->result.'</td>';
echo '</tr>';
$i++;
}
?>
</table>

关于php - 如何在 virustotal api v2 for php 中获取 div 命令结构化结果?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17033908/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com