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

  • SEARCH
  • Home
  • 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 9213013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:39:09+00:00 2026-06-18T01:39:09+00:00

i want to make a link that is valid only for 24 hours, this

  • 0

i want to make a link that is valid only for 24 hours, this is for a validation purpose, so my question is simple:

How do i make this link valid only for this time; i’ve a hint:

  1. Get the epoch time.
  2. Make a link using only this value: something.com/time/1359380374
  3. When the user clics on the link, extract this value and compare.

I hear about Hash values? why? we cant get the time from the hash value (invert the process) so how this is done?

  • 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-18T01:39:10+00:00Added an answer on June 18, 2026 at 1:39 am

    Your best bet is to have the users email send as an argument and then query the database to see if their link has expired:

    Requested link query: update users set locked_stamp = now();

    Request url: http://yourdomain.com/?email=useremail

    Query: select true from users where email = '$email' and locked_stamp > now()-interval 1 hour and now() limit 1

    Result: You have a person requesting within the hour with email: $email.


    I have a script that using base64 to encode the timestamp… but its not secure by any means.

    import tornado.web
    import base64, re, time
    import sys
    
    def get_time():
        """Method used to get the current time in b64"""
        return base64.b64encode(str(int(time.mktime(time.localtime()))))
    
    class WebHandler(tornado.web.RequestHandler):
        def get(self, _time):
            timecheck = base64.b64decode(_time)
            try:
                #require it to be all digits
                assert re.match('^\d+$', timecheck) is not None
                # Must be within 1 hour: greater then 1 hour ago and less then now
                assert int(timecheck) > int(time.mktime(time.localtime()))-3600 and \
                    int(timecheck) < int(time.mktime(time.localtime()))
            except AssertionError:
                raise tornado.web.HTTPError(401,'Woops! Unauthorized.')
            else:
                self.write('Pass')
    
    
    # Route
    application = tornado.web.Application([
        (r"/([^\/]+)/?", WebHandler),
    ])
    
    
    if __name__ == "__main__":
        application.listen(8889)
        tornado.ioloop.IOLoop.instance().start()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a code that counts the click on the link which
I want to make a back link that will link to the controller index.
Is it possible to make a link that does nothing? I want the item
I want to verify that the user email is valid and turn this email
This question assumes that the python package I want to install is a django
I have link for example domain.com/de/controler/action?param=value and I want make actionlink to keep same
I want to make the descriptive text around a form link also open the
I have a link_to_remote and I want to make sure people can only click
I'm using jQuery. This is my second post to make my old question more
I'm trying to make sure that a Rapidshare URL is valid when a user

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.