1. Go to this page and download the library: Download mltpss/php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
/**
* Display a "Support us" message.
*/
function supportBlock() { }
``
For instance:
/**
* Display a locking block.
*/
function lockingBlock() { }
``
For instance:
if ($sqweb->waitToDisplay('15/09/16', 'd/m/y', 2)) {
// The content here will appear 2 days after the publication date for non paying users.
} else {
// Here you can put content that free users will see until the content above is available for all.
$sqweb->lockingBlock();
}
/**
* Put opacity to your text
* Returns text with opacity style.
* @param $text Text you want to limit.
* @param int $percent Percent of your text you want to show.
* @return string
*/
function transparent($text, $percent = 100) { ... }
echo $sqweb->transparent('one two three four', 50);
/*
* @param string $date When to publish the content on your site. It must be an ISO format(YYYY-MM-DD).
* @param int $wait Number of days you want to wait before showing this content to free users.
*/
function waitToDisplay($date, $wait = 0) { ... }
if ($sqweb->waitToDisplay('15/09/16', 'd/m/y', 2)) {
// The content here will appear 2 days after the publication date for non paying users.
} else {
// Here you can put content that free users will see until the content above is available for all.
}
if ($sqweb->limitArticle(5) === true) {
echo "This is my article";
} else {
echo "Sorry, you reached the limit of pages you can see today, come back tomorrow or subscribe to Multipass to get unlimited articles !";
}
Will display the block.
#### Display a locking div for your users
php
$sqweb = new SQweb;
$sqweb->lockingBlock();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.