The unlock attribute of a paid-link indicates the absolute URL for the content that must be unlocked for access when the link is paid. The content will then be unlocked for the period of time indicated by the duration attribute.
However, it is possible to lock the content again at any given moment, before the indicated time expires. To do so, load the iCents.Lock function and pass the same unlock attribute and the same attribute appendable as function parameters that unlocked the content.
Syntax:
iCents.Lock(URL,appendable)
For example:
iCents.Lock("http://example.com/test.html", false)
If a given content was unlocked by more than one paid-link, you will need to run an equivalent number of iCents.Lock commands to lock it again. For example:
If the test.html content is unlocked by the two following paid-links:
<a href="test.html" unlock="test.html" price="0.01 USD"> <a href="test.html" unlock="tes" appendable="true" price="0.01 USD">You will need to perform the following procedure to lock it:
iCents.Lock("test.html", false) iCents.Lock("tes", true)
Warning: Situations that require you to block content using the iCents.Lock function are very rare. You should normally allow the content to block itself when the purchased time expires.