Hi,
You'll need to store the fact that the link is expired somewhere, preferably where your end user can't get to it.
If your link is pulling all of its information from a single object and sending it to one or multiple people at the same time, consider a custom date/time field on Opportunity to store the expiration date. I'm not going to go in to how to set that field.
The links you send to your contacts should all reference the same Visualforce page, but they should have a URL parameter in them that references the object you want them to see information from:
http://instance.salesforce.com/apex/YourPage?id=opportunityId
If you're sending the link to the information on this object to multiple people at multiple different times, that complicates it. To use that field, in your visualforce page you'll want to do something like this:
<apex:page action="{!checkExpiration}" controller="{!pageController}"/>
That action runs on page load, and inside the controller you'll have a function that might look like this.
public pageReference checkExpiration() {
if(myObject.linkExpiration > System.now()) {
//send your user to a page indicating the link is expired
return new PageReference('/apex/LinkExpired');
} else {
return null;
}
}
Thanks.