I am uploading files to my server and nameing them with record ID. because record id is in sequence, these files are not safe can be downloaded in loop. http://www.blabla.com/1.jpg .. 2.jpg etc.
I want to encrypt the record id to 7 char and while reading these files I want to dycrypt it back.
so file names would be
http://www.blabla.com/72ayhg6.jpg
which(72ayhg6) is when dycripted is id 1.
How can I do this using php.
Php decrypt and encrypt generate quite a long number. Can I added some sort of salt in it and limited it to 7 or 11 char.
thanks in advance.
Check this http://kevin.vanzonneveld.net/techblog/article/create_short_ids_with_php_like_youtube_or_tinyurl/