/    Sign up×
Community /Pin to ProfileBookmark

Upload a file, generate a MD5, insert into database

Here’s what I’d like to do:

1) Upload a file, make sure doesn’t already exist
2) Create a MD5 crc of the file
3) Insert the MD5 crc into database

Is it possible to use PHP to ‘listen’ to the upload stream and generate a MD5 checksum of the uploaded file or do I need to use 3rd party application?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@sciguyryanSep 20.2004 — Well have a look at these, they may help:

FTP Functions: http://uk2.php.net/ftp

MD5: http://uk2.php.net/md5

MD5 File: http://uk2.php.net/md5_file

hope that helps,

RyanJ
Copy linkTweet thisAlerts:
@artemisSep 20.2004 — [font=technical][size=3]http://uk2.php.net/md5file

edit: beat me to it![/size]
[/font]
×

Success!

Help @ilbonparaurti spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...