Felu
Veteran Member
    
Posts: 2223 Reputation: 72
30 / / 
Joined: Apr 2006
Status: Away
|
RE: [small php request] can someone write me hash creator
code: <?php
//Define the path as relative
$path = ".";
$dir_handle = @opendir($path) or die("Unable to open $path");
?>
<table>
<tr>
<th>MD5 hash</th>
<th>Name</th>
</tr>
<?php
//Running the loop
while ($file = readdir($dir_handle))
{
if($file != "." && $file != ".."){
if(!is_dir($file)){
$md5 = md5_file($file);
echo "<tr><td>$md5</td><td><a href='$file'>$file</a></td></tr>";
}
}
}
?>
</table>
<?php
//close the directory
closedir($dir_handle);
?>
Should work fine  .
This post was edited on 04-02-2007 at 12:22 PM by Felu.
|
|