ZulfadlyAshBurn Posted May 21, 2011 Share Posted May 21, 2011 I would like to secure my files from being downloaded using this code. <?php $unique = md5( uniqid() ); // 32 hex characters ?> but i dont know how to apply it to my files. Quote Link to comment https://forums.phpfreaks.com/topic/237054-uniqid/ Share on other sites More sharing options...
trq Posted May 22, 2011 Share Posted May 22, 2011 So, even though you have some code that you obviously don't understand you want to use it to do a specific task? Can you explain to me.... how exactly do you expect the code shown to secure anything? Quote Link to comment https://forums.phpfreaks.com/topic/237054-uniqid/#findComment-1218571 Share on other sites More sharing options...
xyph Posted May 22, 2011 Share Posted May 22, 2011 He just wants to obscure his filenames using a hashed filename, I think. It's the wrong way to do it though, IMO Quote Link to comment https://forums.phpfreaks.com/topic/237054-uniqid/#findComment-1218610 Share on other sites More sharing options...
ZulfadlyAshBurn Posted May 22, 2011 Author Share Posted May 22, 2011 when the user click the link, the music player plays the music. but the link attached to it has extra variable like uniqid and store as a sesion. when the user clicks on the link, it GET file from another page using ajax then uncode the url and get the file name and get the cookie name, once the session name is approved, it will delete the session. but the thing is i have many files. so how do i store cookies for every songs listed. bear in mind that the songs links listed only when page executed by php Quote Link to comment https://forums.phpfreaks.com/topic/237054-uniqid/#findComment-1218777 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.