N
nikolaj
Непосредственно с virustotal.com скачен PHP_VirusTotal_API_Functions, простой html - формой спрашиваю у пользователя путь к файлу и отдаю API. Но не получается, не работает... прошу помощи.
Первый строки скрипта, полный приатачен к посту
Я пытался подсмотреть что форма пересылает скрипту в переменной fn, но так и не чего не увидел(( Что я делаю не так?
HTML:
<form action="indexff.php" enctype="multipart/form-data" method="post">
<label for="file">Filename:</label>
<input type="file" name="fn" />
<input type="submit" />
PHP:
<?php
// Date: 11/11/10
// This file contains five functions: virustotal_scanfile(), virustotal_getreport(),
// virustotal_makecomment(), virustotal_scanurl() and virustotal_geturlreport().
// virustotal_scanfile() uploads a file to Virus Total.
// virustotal_getreport() retrieves the virus report.
// virustotal_makecomment() adds a comment to an already uploaded file
// virustotal_scanurl() sends a URL to scan
// virustotal_geturlreport() sends a URL to scan or gets a URL report
// You cannot execute virustotal_getreport() immediately after virustotal_scanfile() as
// Virus Total needs a moment to get and process the file.
// To use Virus Total's API you need an API key. To get that you need to register here:
// http://www.virustotal.com/vt-community/register.html. Then go to My Account > Inbox >
// Public API.
print $_POST['fn'];
$FileName = $_POST['fn'];
print "Your sc@n file name is ". $FileName;
$key = 'myAPI'; // Your API key
$file = $FileName; // The file to be scanned or to retrieve a virus report for