how to identify unique files in a dir?
<p>I have a code that lists all files in a dir. The code looks something like this:</p>

<pre><code>//path to directory to scan
$directory = "../images/team/harry/";

//get all image files with a .jpg extension.
$images = glob($directory . "*.jpg");

//print each file name
foreach($images as $image)
{
   echo "some.php?file=".$image;
}
</code></pre>

<p>In the link part where it says <code>echo "some.php?file=".$image;</code> I need to identify each file uniquely and forward it by $_GET or $_POST or something to the next page. However, the file names may contain special characters (diacritics), spaces etc. as they are uploaded by users by FTP. What would be a good way to identify them in the next page? Something like an ID, maybe base64_encode / decode or similar? (using simply a counter may not be reliable as the files may get deleted in the mean time which would yeld a wrong result)</p>
