jayzeng / virustotal_apiwrapper

Virus Total Public API v2.0 PHP Wrapper
http://jayzeng.github.io/virustotal_apiwrapper/
MIT License
65 stars 18 forks source link

File Scan is not working #12

Closed akanshgulati closed 8 years ago

akanshgulati commented 9 years ago

I tried to execute example file.php and it`s returning error:

Fatal error: Uncaught exception 'Guzzle\Http\Exception\CurlException' with message '[curl] 26: couldn't open file "foo.txt" [url] https://www.virustotal.com/vtapi/v2/file/scan' in C:\xampp\htdocs\virustotal\Vendors\guzzle\guzzle\src\Guzzle\Http\Curl\CurlMulti.php on line 359
( ! ) Guzzle\Http\Exception\CurlException: [curl] 26: couldn't open file "foo.txt" [url] https://www.virustotal.com/vtapi/v2/file/scan in C:\xampp\htdocs\virustotal\Vendors\guzzle\guzzle\src\Guzzle\Http\Curl\CurlMulti.php on line 359
Call Stack```
jayzeng commented 9 years ago

@akanshgulati by looking at the error message (couldn't open file "foo.txt"), seems like it failed because of it can't find the file, did you try to specify absolute path (for debugging purpose)?

If you can post your code snippet, I may be able to provide some more help.

akanshgulati commented 9 years ago

@jayzeng Yeah I even tried with absolute path. The url scanning worked fine. Only issue came while scanning a file.

jayzeng commented 9 years ago

hmmm, I will play around it this afternoon.

jayzeng commented 9 years ago

@akanshgulati sorry for the delay. I just did a quick test and didn't experience any problem, I pushed the code for you as an example (https://github.com/jayzeng/virustotal_apiwrapper/tree/example_test), only thing you need to do is to put in your api key in https://github.com/jayzeng/virustotal_apiwrapper/blob/example_test/test.php

And my version of php:

�  virus_total git:(example_test) php -v
PHP 5.5.20 (cli) (built: Feb 25 2015 23:30:53)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

Let me know if you run into any other problems

akanshgulati commented 9 years ago

Thanks @jayzeng I will check it later now as other API has fulfilled my need. Will update you soon on this. You can close this issue now.