Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9220911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:27:30+00:00 2026-06-18T03:27:30+00:00

What I am trying to achieve is to create a one-time video link for

  • 0

What I am trying to achieve is to create a one-time video link for the user. Ones they watch the video the link expires lets say the link expires in 1h after its original creation.

The problem is how to go about it. I can use mod_rewrite to dynamically pass values to PHP and SQL

So lets say

mysite.ltd/get_video/Jn12lM2NMZ21oMW312/11111111/The-Amazing-Spider-Man.mp4

Breakdown: get_video is get_video.php, Jn12lM2NMZ21oMW312 is a temporary token and 11111111 is a time stamp, The-Amazing-Spider-Man.mp4 is the file name.

Based on my conclusion the token + time stamp would be generated on video page visit and inserted into SQL, if the user shared the video link others wont be able to access it as it would fail on token validation which is get_video comparing hashed IP of current user and to the hash token in SQL.

This is my view on how to do it, but I was wondering if any one got a better solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:27:31+00:00Added an answer on June 18, 2026 at 3:27 am

    You do not even need to save the token and timestamp. What you want is a hash of the user’s IP address, a timestamp and some nice long secret salt (preferably generated uniquely for every user):

    $token = somehash($ip_address . $timestamp . $secret);
    
    $url = 'http://xxx/' . $token . '/' . $timestamp . '/filename';
    

    Once the user visits the URL you replay the hash with the user’s data. If equal and the request didn’t expire, yet, serve the video.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am trying to create an .htaccess file that will achieve the following create
Trying to achieve any moving effect while appending an element from one to another
I'm having some problems trying to dynamically create multiple RadDocks at the same time.
I am trying create a seed point for Joda-Time. What I am trying to
Trying to achieve the goal of printing selected page's element ONE-TO-ONE - the exact
im trying to achieve something but i dont really know how I have set
What I'm trying to achieve is show count of lines starting with/ending with needle
What i'm trying to achieve is playing a guitar chord from my python application.
What I'm trying to achieve is: Let inflector slug Ignore a special character in
I am trying to achieve an effect of overlapping the main window boundary with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.