Google Answers Logo
View Question
 
Q: How can I implement a hidden link that deactivates once clicked ( No Answer,   1 Comment )
Question  
Subject: How can I implement a hidden link that deactivates once clicked
Category: Computers > Programming
Asked by: awilson1776-ga
List Price: $20.00
Posted: 30 Jan 2006 09:19 PST
Expires: 01 Mar 2006 09:19 PST
Question ID: 439252
I want to put a hidden link in my website that activates at a certain
time each day (the time will change from day to day) and that
deactivates once it is clicked so that anybody else who
views/downloads the page and clicks on the link it is deactivated. My
guess is that the code would need to be server side rather than client
side so that if two or more download the page at the same time and one
of them clicks the hidden link the others won't be able to click it.

And the link (and code) must be hidden from view by viewing source.

Can this be done and if so how?
Answer  
There is no answer at this time.

Comments  
Subject: Re: How can I implement a hidden link that deactivates once clicked
From: ljbuesch-ga on 07 Feb 2006 04:59 PST
 
This would be pretty simple.  You can add a bit of PHP code (if you
know it) to the page.  It would look something like this:
(PSEUDUO Code)
<?PHP

if (timeofday==time I want to display link) {
 echo link to page
}
?>

then in the page you want to link to, you can add a table in your
database that asys "hidden hit" and a field that is either yes or no.
then the code for that page would be:

<?PHP
if (get_hidden_hit_from_database!=yes) {
 display page()
} else {
 display_too_late_page()
}
?>

I hope that helps :)

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy