Site Map
Tools
Authorizations:
›› remove

 

code Attribute

To control access to content means to prevent the Internet user from accessing premium content that has not been paid for. The iCents JavaScript API running on the user's browser is part of this content control already; it prevents a link to be clicked and followed without having been paid. However, if the user directly types the URL of a content website in his/her browser, the website server will also need to know if the user has paid for it or not. This is done with the help of the "code".

When initializing iCents.net you already provide a code parameter, that will be used for the whole page.

However, you may also provide a code atribute inside any paid-link HTML. This will overide the code for this specific link only. The code attribute is a sequence of 57 seemingly random numbers, letters or symbols, as shown in the HTML code of the paid-link below:

<a href="http://www.example.com/test.html"
iCents="0.01 USD"
unlock="http://www.example.com/test.html"
duration="10"
code="KXvCDfvZsnD0fNsOq47gPK2oump94WDkvvq1myWhnZCO*TeTPtmB7153f">

Troubleshooting