Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i m developing one application now i have made one accounting software and i have my websites on this there is some information about this software with this i have put one link called download demo now whenever click on this link one inquiry form is open in that user fill his inquiry for this software with compulsary field email address now whenever he press submit button the link will send to his email and he can download this demo of software now that link should be random number and not like www.xyz.com/test.aspx?demosoftware and after 24 hours that link should be disappeare to that user..... i have complete mailing module to simple one mail will send to him but how should i mail this link to him???please anyone help me ...
Posted

 
Share this answer
 
Comments
pandya purvang 5-Apr-13 3:34am    
sir actully i want random number generated link ......
You can use GUID.
You can pass one GUID as a parameter to a particular page, but you can't create a link, which itself will be random without a domain (xyz.com).
 
Share this answer
 
Hi,

There is no straight forward solution for this. you need to use encryption along with some salt. for every day you need to generate one string and that string will be validated from the server side. Even you need to check if the link is from the same ip address or from the different(in case you want to restrict users).

One of the way is,
You can use MD5 along with some salt. First get the current date. and apply MD5 on that after adding salt(some predefined string). Pass this baked encrypted string to the URL for download in the email.

On the server side you already have the current date. you need to do the same process on the server side. get the date, add salt with the date and generate MD5. If both MD5 match then popup for the download, otherwise you can prompt some message.

You also need to consider localization for this methodology. If you will use Server date then this issue will not happen. so best option is to use server date.

Best luck
-Amit
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900