N
N
nezzard2016-11-02 11:33:15
PHP
nezzard, 2016-11-02 11:33:15

How to encode and decode a link?

Good afternoon, tell me the implementation option.
There is a link, there is a lifetime of this link.
You need to generate some md5 from this data, after which, when you go to this link, php checks this md5 for expiration and so on.
As I understand it, MD5 cannot be decoded, so I was puzzled, in what way can this be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2016-11-02
@xpert13

Record links and their expiration date in the MD5 database. When you click on the link, take MD5, look for an entry in the database using it, and if the term has not expired, do what you need.
If you need without a database, then the only option is to use not hashing, but encryption.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question