![]() [small php request] can someone write me hash creator - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: [small php request] can someone write me hash creator (/showthread.php?tid=73228) [small php request] can someone write me hash creator by CookieRevised on 04-02-2007 at 12:01 PM
Could someone write me a small php script which outputs a list of hashes (md5) for all the files in the current directory. RE: [small php request] can someone write me hash creator by Felu on 04-02-2007 at 12:21 PM
code:Should work fine ![]() RE: [small php request] can someone write me hash creator by CookieRevised on 04-02-2007 at 12:49 PM
it works... thanks (now lets test my 1GB dir of files to see if they are uploaded properly RE: [small php request] can someone write me hash creator by Felu on 04-02-2007 at 12:51 PM
quote:Can you tell me what the error is ![]() RE: [small php request] can someone write me hash creator by surfichris on 04-02-2007 at 12:58 PM
quote:Possibly you don't attach the path to $file. Cookie: That means all of your hashes are bad. Above this: code: Add: code: (Assuming he changed the path he was using) By the way, the way you are looping over the directory is bad. You should be using: code: RE: [small php request] can someone write me hash creator by Nathan on 04-02-2007 at 01:15 PM
I've been talking to cookie and by the looks of things he has got a outdated version of php. Because netherless felu's code works (messy it may be) on my server. RE: [small php request] can someone write me hash creator by Eljay on 04-02-2007 at 01:23 PM
I started this before Felu posted his code, but I got bored so I added recursive listing code: RE: [small php request] can someone write me hash creator by CookieRevised on 04-02-2007 at 01:26 PM
quote:[02-Apr-2007 08:22:05] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions//usr/local/lib/php/extensions/no-debug-non-zts-20050922/ffmpeg.so' - /usr/local/lib/php/extensions//usr/local/lib/php/extensions/no-debug-non-zts-20050922/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0 quote:hashes are generated properly though since 99% of files have same hash as original local ones (some not.. .damn connection hickups) PS: didn't changed the path. simply uploaded in the files dir. Nevertheless, I'll add that line, thanks. RE: [small php request] can someone write me hash creator by Dempsey on 04-02-2007 at 01:37 PM
quote:Is it running on my server? ![]() RE: [small php request] can someone write me hash creator by CookieRevised on 04-02-2007 at 02:48 PM
quote:yep PS [off topic]: we (nathan and me) also tried to trasnfer from server (yours) to server (nathan's). This didn't work either. It connected both (tried both WS_FTP and SmartFTP) but didn't transfer... RE: [small php request] can someone write me hash creator by Felu on 04-02-2007 at 02:51 PM
quote:while ($file = readdir($dir_handle)) !== false) Two '(' were and and then you close 3? Mind explaining why? And also what would !== false do ![]() quote:You mean to say that my code has no mistakes ![]() RE: [small php request] can someone write me hash creator by hmaster on 04-02-2007 at 03:29 PM
It should be: code:as shown on the php.net page both the correct and wrong ways, http://uk2.php.net/readdir . RE: [small php request] can someone write me hash creator by surfichris on 04-02-2007 at 11:37 PM
quote:Typo. quote:Try yours, place a file called "0" in the directory along with some others and watch yours exit on that. 0 is essentially false when doing standard == checking so you need to compare at the actual level which is ===. In that case, 0 != false, 0 = 0. |