For a detailed description of this API implementation, please have a look on my post about VirusTotal API version 1.0.
Let me know if you have any questions or problems using this PHP API script.
This entry was posted in PHP and tagged Development, malware, PHP, VirusTotal. Bookmark the permalink.
first obviously the script does not find your file and second this script needs the PHP curl extension to be installed and activated.
Can I add it to the Blog by Google?
sorry, but I don't understand what you're talking about.
Oh, forgot to mention that I checked that the API key was the correct one. Even tested it using a second key.
I've tested it again right now and the script works fine also for scanning URLs with the parameters you're using.
The result code "-1″ means that there is something wrong with your API key ("you do not have the required privileges"). Maybe you're tying to use an API key from version 1 for the version 2 API?
Is there any other API key?
for more that 3 months, your php script for virustotal API2 was working fine, but nowadays, I dont know what happened , it does't work and actually I got timeout error message, which means that there is no response from virsutotal website.
sorry, but I don't what the problem is either, but a timeout error message does not sound like a problem with this PHP script, but more with e. g. the API server. Therefore maybe you should ask VirusTotal about this issue.
There is a point I want to make sure. I use virustotal php api to upload my files for scanning. I find that when I get associated reports, I will get the results of previous analysis, right!? Given the condition, is there any method could I use the virustotal php api to do the "Reanalysis" action (get the lately scanned results)?
as far as I know files are always rescanned when you're submitting them through the API.
But keep in mind that scanning may take several hours till it has been completed. Therefore you should check some hours after submitting again if you get a newer scan report then.
Is someone able to use the API to test URls? I always get "-1″ no matter what I try (different API keys, different URls, etc).
I can't see a simple way of fixing this error. Do you have any advice on the matter?
I've also tried using PHP v5.2.x and it is working ok. Not sure at which point this was deprecated.