I'm not sure but how to simply add current session id with a link/download links ?
<?php if($images) { $i=0; for ($index = 0; $index < count($images); $index++){ $i++ ?>
<a href="<?php echo $images[$index]; ?>">Download</a><br/>
<?php }}?>
For example:
<?php if($images) { $i=0; for ($index = 0; $index < count($images); $index++){ $i++ ?>
<a href="<?php echo $images[$index] . '?PHPSESSID=' . session_id(); ?>">Download</a><br/>
<?php }}?>