My script here works fine:
image protection in codeigniter
However it displays a broken image if my filename has a space, so say it is "obama 1.jpg".
To try and resolve this problem, I have used http://php.net/manual/en/function.escapeshellarg.php
And replaced all the white spaces in the img_id with "%"s.
But I have had no luck. I cannot strip the white spaces out, so will have to make due with the structure of the string.
Thanks for your help.