|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
||||
|
||||
|
Virus scanning an uploaded file
The uploading part is elementary, however I wonder how I would go about implementing a virus scan of the file?
A lot of peeps seem to frown on it, but I am probably going to store the file in a database as a blob. I'd prefer handling it this way since any file that is uploaded will be a text file or small batch file. I wouldn't do it this way if I were handling images or other larger files. The trick is how to I scan it prior to inserting into the db? Or, I guess the better question is how do I insert a file into mysql db from a linux command prompt? I can upload the file, run my virus scan with a system command, and abort if virus is found, or return an 'ok' if the file is ok. If ok, do the MySQL insert statement and finish the operation. |
|
#2
|
|||
|
|||
|
I don't really see why you'd want to insert it from a linux shell. Can't you just do
PHP Code:
from your PHP script after you scanned it? |
![]() |
| Viewing: Dev Shed Forums > System Administration > Antivirus Protection > Virus scanning an uploaded file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|