php - protecting video hotlink by one time url path. (vk.com in example) -
how can protect videos hotlinking?
for example: http://vk.com/video215336036_165406371
when @ source code, vk.com provides one-time usage video path such
http://cs523402v4.vk.me/u215336036/videos/d436dc950c.240.mp4
you have directory inaccessible outside world have video files. have database table structure like:
videos --------------- id uri temp_url timeout
where uri
location of real video file , temp_url
random url generate. timeout
field contains timestamp describing when temp_url
expires , have generate new one. set timeout 5 minutes when generate new temp_url
or 10 minutes. you.
Comments
Post a Comment