Script Creadunet Version 3
Module Captcha - Creadunet 3
Since Creadunet 3.0.0 you can put the captcha you want.
The script comes with 2 captchas:
- captcha classic called captcha Creadunet
- captcha advertising (solvemedia)
If you want to add another one, it happens in:
/mods/captcha/captcha.php
The instructions are in the file.
Here, the code with Creadunet captcha
Solvemedia is desactivated by /* */
/* UTILISATION de la CAPTCHA CREADUNET */
if (isset($_POST['captcha']) && md5($_POST['captcha']) != $_SESSION['captcha']) {
$captchaReponse = _t("Code Anti-Robot invalide");
} else {
$captchaReponse = 'ok';
}
$txtCaptcha = '<img src="/mods/captcha/captchaCreadunet/captcha.php" alt="Captcha" id="captcha" />
<b>'._t("Code Anti-Robot :").'</b>
<input type="text" name="captcha" value="" />';
/* UTILISATION de la CAPTCHA SolveMedia
require_once('solvemedia/solvemedialib.php'); //include the Solve Media library
if (isset($_POST['adcopy_challenge'])) {
$privkey = 'private_key_to_put_here';
$hashkey = 'hash_key_solve_media';
$solvemedia_response = solvemedia_check_answer($privkey,
$_SERVER['REMOTE_ADDR'],
$_POST['adcopy_challenge'],
$_POST['adcopy_response'],
$hashkey);
if (!$solvemedia_response->is_valid) {
//handle incorrect answer
$captchaReponse = _t("Code Anti-Robot invalide").' : '.$solvemedia_response->error;
}
else {
$captchaReponse = 'ok';
}
}
$txtCaptcha = solvemedia_get_html('key_solvemedia', null, true); //true for https, false for http
//$txtCaptcha = solvemedia_get_html('key_solvemedia'); //si site pas https
*/
Same thing, with Creadunet captcha desactivated, and Solvemedia activated.
(be carefull with last line of solvemedia, with or without httpS - take the right line!!)
/* UTILISATION de la CAPTCHA CREADUNET
if (isset($_POST['captcha']) && md5($_POST['captcha']) != $_SESSION['captcha']) {
$captchaReponse = _t("Code Anti-Robot invalide");
} else {
$captchaReponse = 'ok';
}
$txtCaptcha = '<img src="/mods/captcha/captchaCreadunet/captcha.php" alt="Captcha" id="captcha" />
<b>'._t("Code Anti-Robot :").'</b>
<input type="text" name="captcha" value="" />';
*/
/* UTILISATION de la CAPTCHA SolveMedia */
require_once('solvemedia/solvemedialib.php'); //include the Solve Media library
if (isset($_POST['adcopy_challenge'])) {
$privkey = 'private_key_to_put_here';
$hashkey = 'hash_key_solve_media';
$solvemedia_response = solvemedia_check_answer($privkey,
$_SERVER['REMOTE_ADDR'],
$_POST['adcopy_challenge'],
$_POST['adcopy_response'],
$hashkey);
if (!$solvemedia_response->is_valid) {
//handle incorrect answer
$captchaReponse = _t("Code Anti-Robot invalide").' : '.$solvemedia_response->error;
}
else {
$captchaReponse = 'ok';
}
}
$txtCaptcha = solvemedia_get_html('key_solvemedia', null, true); //true for https, false for http
//$txtCaptcha = solvemedia_get_html('key_solvemedia'); //si site pas https
Broadly speaking,
1- a code to display the captcha
2- a code to check the captcha, which returns OK if it's good.
Author: creadunet
Last update: 2017-09-16 14:42
Summary Help Creadunet 3
1- INSTALLATION
2- Advanced and Special Settings
2-a Advanced Settings
2-b Special Settings
3- MODULES
3-a Modules BONUS (Offerwall)
3-b Modules Captha
3-c Modules Rankings
3-d Modules Games
To activate games on the games page, you have to add them to the menu, in the file /mods/jeux/jeuxActifs.php
For example:
$ MenuJeu [0] = _t ("Grattage");
$ MenuJeu [1] = _t ("Grille à Cadeaux");
This allows to display the 2 games delivered with the scripts.
If you add games, just add them to this menu, so that they appear on your site.
Be
careful, the $menuJeu [2] to $menuJeu [4] are reserved for the 3
manageable games in admin (Lottery - Even/Odd and Magic Number.
3-e Module Payments Systems
Activate / deactivate / Add / Delete payment systems from admin: Configuration.
The script comes with 4 pre-installed payment systems.
3-f Module GeoIP
3-g Module PTC Cheat
3-h Module Flux PTC
3-i Module Chat
4- TEMPLATE
Author: creadunet
Last update: 2017-02-05 18:05
Advanced Settings - Creadunet 3
You may need to change some settings, manually editing the configuration files.
Some specific values ??are not managed from the admin.
Viewing PHP Errors
By default, all PHP errors are displayed (or logged)
You can change and no longer display errors.
Open the file /includes/datasCreadunet.php, and change the line:
Ini_set ('display_errors', true);
Put false, or //ini_set ('display_errors', true); To use the default value of your hosting.
TimeZone
When installing the script, your zone was detected if possible.
If it was not detected, it was set to "Europe / Paris" by default.
If you want to change the value, open the /includes/datasCreadunet.php file, and change the line:
Date_default_timezone_set ('Europe / Paris');
Put a valid value !! (Valid timezone)
GeoIP
The GeoIP setting was done during the installation.
Most of the time you will use the value 2.
You can change this value.
Open the file /includes/datasCreadunet.php, and change the line:
Define ('GEOIP', 2);
1 = GeoIP installed on the server (and usable via variables $ _SERVER)
2 = use the php_GeoIP module provided with the script or on the download page.
Optimization Mysql queries for ads
On large PTPs, you can save MySql queries (and thus significantly improve performance) by changing a setting.
Open the file /includes/datasCreadunet.php, and change the line:
Define ('_ OPTIMISE_GESTION_PUB_', 0);
Possible values:
0 = no optimization, display stats are accurate
1 = slight optimization (50% less resources), the display stats are a little less precise
2 = significant optimization (75% fewer resources), display stats are somewhat less accurate
Smarty
By default, smarty is set to be optimized. Attention, this means that when you upgrade your template, it will be necessary to empty the cache! Otherwise, no update!
$smartyDdebug = false; // default setting to false
$smartyForceCompile = false; // default setting to false
$smartyCompileCheck = false; // default setting to false
SMARTY INFO
If
$smartyCompileCheck is active, each template and configuration file
that is related to the cache file will be checked for any changes. If any of these files have been changed since the
Cache file has been generated, the cache is immediately regenerated. This process is expensive, so for performance reasons, set this parameter to FALSE for an application in production.
If $smartyForceCompile is active, it's like there is no cache
$smartyDdebug is used to debug.
Author: creadunet
Last update: 2017-01-20 18:45
Paiement Bitcoin, Litecoin
For payments as Bitcoin, Litecoin ..., I use goUrl.
1- Create an account on: https://gourl.io (which supports a dozen coins)
2- Go to the page: https://gourl.io/info/memberarea/My_Account.html
3- Section 2. Your Cryptocoin Payment Box / Captcha and click on the Create New Payment Box for Your Website button
4- configure a new Paybox for a currency and your site, or click on edit to see the IDs to retrieve
5- copy these IDs
into /mods/payment/coin-gourl/bitcoin/configuration.php for bitcoin or /mods/payment/coin-gourl/litecoin/configuration.php for
litecoin
'boxID' => 1234,
'publicKey' => '7304AAfSauBBitcoin99ATCPUBgNzLIVhGktNNCsbhOvG1OofG',
'privateKey' => '7304AAfSauBBitcoin99ATCPRVLO4lkXpOyZUcT46M36hi8jRM',
To add a new type of corner, it is very simple:
Copy the entire directory / mods / payment / corner-gourl / bitcoin / and name it for example speedcoin
And adjust the configuration!
Author: creadunet
Last update: 2017-01-21 23:38
Payment Hipay
Hipay is pre-installed, just configure your account info.
Open the file /mods/paiement/hipay/configurationHipay.php
If you want to test, use a Hipay Sandbox account!
Here is the configuration table to fill:
$settingsPayment = array(
'cheminForm' => '/mods/paiement/hipay/hipayredirect.php',
'imageForm' => '/mods/paiement/hipay/hipay.png',
'chemin' => 'https://test-ws.hipay.com/soap/payment-v2?wsdl',//sandbox or real
'wsLogin' => '0a13dddc55686f3be79c8c810c8106cc',//edit with your parameters
'wsPassword' => '7f902ce8177637eb5a4370adf50d41f9',//edit with your parameters
'websiteId' => '397551',//edit with your parameters
'categoryId' => '12',//edit with your parameters
'currency' => 'EUR',//edit with your parameters
'rating' => 'ALL',//edit with your parameters
'locale' => 'fr_FR',//edit with your parameters
'urlLogo' => 'https://static.e-junkie.com/sslpic/171337.d729868432ee12a12d69e54e8ab36a92.jpg',
'urlDecline' => '/achats.php?paiement=annule',
'urlCancel' => '/achats.php?paiement=annule',
'urlCallback' => '/mods/paiement/hipay/hipaynotify.php',
'urlAccept' => '/achats.php?pay=OK',
);
'chemin' => put here, the path to Hipay, either real or sandbox.
sandbox = 'chemin' => 'https://test-ws.hipay.com/soap/payment-v2?wsdl'
réel = 'chemin' => 'https://ws.hipay.com/soap/payment-v2?wsdl'
'wsLogin' => '0a13dddc55686f3be79c9d9810c8106cc',//edit with your parameters
'wsPassword' => '7f902ce8177637eb5a5480adf50d41f9',//edit with your parameters
WsLogin and wsPassord are to be recovered on your HipayWallet account. On the menu, click Merchant / API Kit. The Webservices accesses appear at the bottom (login and password)
'websiteId' => '387551',//edit with your parameters
On the Hipay home page, you have your account (s), with the account number of your site.
'categoryId' => '12',//edit with your parameters
12 It's all right. It's for all public.
'currency' => 'EUR',//edit with your parameters
'rating' => 'ALL',//edit with your parameters
'locale' => 'fr_FR',//edit with your parameters
These 3 parameters are obvious.
'urlLogo' => 'https://static.e-junkie.com/sslpic/xxxxx868432ee12xxx54e8ab36xx2.jpg',
ALWAYS put an image https !! Otherwise, do not set and erase this line.
You can host a free SSL image at http://www.sslpic.com/
Author: creadunet
Last update: 2017-01-22 12:26
Payment Paypal
Paypal is pre-installed, just configure your account info.
Open the file /mods/paiement/paypal/configurationPaypal.php
If you want to test, use a Paypal Sandbox account!
Here is the configuration table to fill:
$settingsPayment = array(
'chemin' => 'https://www.paypal.com/cgi-bin/webscr',
'business' => 'xxx@yyyy.com',//edit with your parameters
'currency_code' => 'EUR',//edit with your parameters
'return' => '/achats.php?pay=OK',
'notify_url' => '/mods/paiement/paypal/ppnotify.php',
'image' => 'https://www.paypal.com/fr_FR/i/btn/x-click-but02.gif'
);
'chemin' => put here, the path to Paypal, either real or sandbox.
sandbox = 'chemin' => 'https://www.sandbox.paypal.com/cgi-bin/webscr'
réel = 'chemin' => 'https://www.paypal.com/cgi-bin/webscr'
'business' => 'your paypal mail address'
'currency' => 'EUR',//edit with your parameters
Put your currency.
'image' =>'https://www.paypal.com/fr_FR/i/btn/x-click-but02.gif'
ALWAYS put an image https !! You can use this paypal default button.
You can host a free SSL image at http://www.sslpic.com/
Author: creadunet
Last update: 2017-01-22 12:25
Payment Payza
Payza is pre-installed, just configure your account info.
Open the file /mods/paiement/payza/configurationPayza.php
Here is the configuration table to fill:
$settingsPayment = array(
'chemin' => 'https://secure.payza.com/checkout',
'business' => 'xxx@yyy.zzz',//edit with your parameters
'currency_code' => 'EUR',//edit with your parameters
'return' => '/achats.php?pay=OK',
'notify_url' => '/mods/paiement/payza/pznotify.php',
'image' => 'https://www.payza.com/images/payza-buy-now.png'
);
'chemin' => put here, the path to Payza, either real or sandbox.
'business' => 'your paypal mail address'
'currency' => 'EUR',//edit with your parameters
Put your currency.
'image' =>'https://www.payza.com/images/payza-buy-now.png'
ALWAYS put an image https !! You can use this paypal default button.
You can host a free SSL image at http://www.sslpic.com/
Author: creadunet
Last update: 2017-01-22 12:34
Flux PTC
To add a new PTC feed, take a template on the script /mods/ptcFlux/webincentive/flux.php
1- make a file by feed.
2- this script must return a table as follows:
$tablePTC[$prefixFlux.$fid]['url'] = url where to send the click
$tablePTC[$prefixFlux.$fid]['timer'] = timer of this ptc (or 0 if multiclic)
$tablePTC[$prefixFlux.$fid]['ad_clics'] = number of clicks of this ptc (or 0 if timer)
$tablePTC[$prefixFlux.$fid]['bonus'] = gain (put a number)
$tablePTC[$prefixFlux.$fid]['typebonus'] = pts or cash
$tablePTC[$prefixFlux.$fid]['banniere'] = url of the banner
$tablePTC[$prefixFlux.$fid]['width'] = banner width
$tablePTC[$prefixFlux.$fid]['height'] = banner height
3- Insert this feed, into the general feed.
In the file: /mods/ptcFlux/ptcflux.php
Add line:
require_once dirname(__FILE__).'/directory feed/flux.php';
example : require_once dirname(__FILE__).'/webincentive/flux.php';
Example for web-incentive that is pre-installed, where you just have to set some variables:
File: /mods/ptcFlux/webincentive/flux.php
$activation_wf_multiclic = 1;//1 to enable multiclic ads
$activation_wf_timer = 1;//1 to enable multiclic ads
$identifiant_wf = 'idWF';//your Web-Incentive ID
$timerPTC_wf = 5;//timer of this ptc (or 0 if multiclic)
$typebonusPTC_wf = 'pts';//pts or cash
$bonusPTC_wf = 5;//win for your member (put a number)
$prefixFlux = 'wf';//put a unique Prefix for each PTC
To subscribe to web-incentive, follow this link
Author: creadunet
Last update: 2017-01-22 15:08
Bonus OfferWall
An OfferWall is pre-installed with the script.
This is clixwall (click to register)
There are 2 steps to install an Offerwall.
!! Attention: the id of the Bonus must be the same on the configuration, and on the database.
The id appears in admin, so no worries.
1- From admin, Payments/Bonus
Add bonus company, and indicate:
Name of Bonus:
Shortcut: (or just the name of the bonus)
Path to this bonus:
Configuration or path to file
2- Add the files to manage the bonus in /mods/bonus
A configuration file, unless you put the configuration in the admin. Example: /mods/bonus/clixwall/configuration.php
A postback processing file. Example: /mods/bonus/clixwall/postback.php
A file that displays the Offerwall. Example: /mods/bonus/clixwall/offerwall.tpl
3- Set the postback URL on the bonus site. For Clixwall, put in Postack URL : http://yoursite/mods/bonus/clixwall/postback.php
Your /postback.php file will just have to send the right data to /mods/bonus/fonctionsPostback.php
Author: creadunet
Last update: 2018-11-11 17:44
Games - Gifts' Grid
This game is set from the file /mods/jeux/grille/grilleConfig.php
1- Put the title of your game on the line:
$grilleTitle = _t("Grille à Cadeaux");
2- Put how much costs each game to the line:
$coutGrille = array('cost' => 500, 'typecost' => 'points'); //every click on the grid costs 500 pts
3- Indicate whether the grid restarts automatically as soon as it is finished:
$restartAuto = 1;//1 for YES, 0 for NO
4- Adjust the grid gains:
//For comma numbers, put one . Example: 0.01 and not 0,01
$gainsGrille = array(
//LOT =>//NB
//array(winning: points OR money, number of cases), IF you edit this array, it doesn't affect the current game. It will be used only for the next game.
array(0.01, 'money', 10),
array(0.02, 'money', 5),
array(50, 'points', 400),
array(100, 'points', 300),
array(200, 'points', 200),
array(300, 'points', 96),
array(500, 'points', 61),
array(1000, 'points', 40),
array(5000, 'points', 10),
array(10000, 'points', 1),
);
5- Do you have a jackpot? It will be sent as soon as the grid is finished, to one of the players drawn
//$jackpot = false; // no Jackpot
//$jackpot = array(50000, 'points');// Jackpot is 50000 points
$jackpot = array(0.5, 'money');// Jackpot is 0.50
6- Put 2 images: 1 for a free space, 1 for a space occupied
//images
$imgOK = array('src'=>'/mods/jeux/grille/img1.png','width'=>30, 'height'=>30);
$imgKO = array('src'=>'/mods/jeux/grille/img2.png','width'=>30, 'height'=>30);
7- Number of cases per line:
$grilleNbPerLine = 20;//number of images per lines
8- Optimization: deactivate the line (with // front) - line 219 (approximately):
//createTheGrid();//you should always desactivate this line after the first use of this module !
Activate this line, just the first time, to start the game.
Afterwards, it is useless, and it must be turned off, to save resources.
Now, the Grid with Gifts is ready!
As soon as the grid is finished, you will receive an e-mail.
If there is a Jackpot, the winner also receives an e-mail, and copies it to you.
If you put a non-automatic Jackpot (points or money), you will receive an email, to warn you to send the jackpot to the winner.
Author: creadunet
Last update: 2017-01-24 11:40
Games - Scratch Tickets
The setting of this game is done from the file /mods/jeux/tickets/ticketsAgratter.php
Set your tickets in the array:
$ticketAgratter = array (
//ticket 1
1 => array(
'active'=>1,//1 = active, 0 = inactive
'title'=>_t('CA$H'),//title of your ticket - Use _t("Your Title") if you want to translate
'instructions'=>_t('Gratte le ticket'),//instruction - Use _t("Your Title") if you want to translate
'cost'=>100,//price of each game (points or money see below)
'typecost'=>'point',// point or money - nothing else is supported
'image'=>'/mods/jeux/tickets/ticket1.png', // main image
'width'=>250, //width in px
'height'=>163, //height in px
'img' => array(
1=> array('/mods/jeux/tickets/ticket1img01.png', 30, 50, 'point'),//url img01 + frequency + winnings + type winning
2=> array('/mods/jeux/tickets/ticket1img02.png', 15, 100, 'point'),//url img02 + frequency + winnings + type winning
3=> array('/mods/jeux/tickets/ticket1img03.png', 6, 150, 'point'),//url img03 + frequency + winnings + type winning
4=> array('/mods/jeux/tickets/ticket1img04.png', 5, 200, 'point'),//url img04 + frequency + winnings + type winning
5=> array('/mods/jeux/tickets/ticket1img05.png', 1, 500, 'point'),//url img05 + frequency + winnings + type winning
),
),
//ticket 2
2 => array(
'active'=>1,
'title'=>_t("Gratt' LaBank"),
'instructions'=>_t('Gratte le coffre'),
'cost'=>0.1,
'typecost'=>'money',
'image'=>'/mods/jeux/tickets/ticket2.jpg',
'width'=>162,
'height'=>247,
'img'=> array(
1=>array('/mods/jeux/tickets/ticket2img01.jpg', 30, 50, 'point'),
2=> array('/mods/jeux/tickets/ticket2img02.jpg', 18, 0.02, 'money'),
3=> array('/mods/jeux/tickets/ticket2img03.jpg', 20, 0.10, 'money'),
4=> array('/mods/jeux/tickets/ticket2img04.jpg', 2, 0.50, 'money'),
),
),
);
You put as many tickets as you want, there is no limit.
For pictures:
- It takes a main image (the one seen before scraping) (in 'image')
- As many images as different gains (in 'img')
- All images of a ticket have the same size
For winnings, 2 settings:
- The type of cost: points or money
- How much it costs in points or money
- In the example above: it costs: 100 points in the 1st ticket, 0.10 € (the currency of your site) in the 2nd ticket
Here, the Scratch tickets are ready!
Author: creadunet
Last update: 2017-01-27 09:36
Special Settings
On the admin, you have some special settings :
Go to Admin / Configuration / Special Settings
PHP mail function () parameters : change this option if the emails are not sent.
It's better to activate the 5th parameters, but some host does not support this feature.
Monthly Automatic Conversion: You can enable or disable automatic conversion on the 1st of each month.
Captcha Management: Enable / disable captchas on your site.
There are 4 captcha : registration, contact, connection, referer
Detects the ads blockers, and does not count the winnings: Enable / disable the detection of ads blockers.
Using a CRON Task to Perform Automatic Monthly Conversion AND Optimize Your Database: You can use a scheduled task, to trigger the monthly conversion, and optimize the tables.
This is the optimum way to do it. If you do not use a CRON task,
it will be enough to connect to admin, this will trigger the file.
How to program a cron task? See with your web host.
This task must be scheduled to be started once a day, early in the morning.
example:
4 * * * * /usr/local/bin/curl http://mydomain/taches_cron.php
==> If you do not understand this passage, leave on: 'I do not use a CRON task'
Use of nginx: Enables / disables URL rewriting via htaccess.
Htaccess is used for promotion pages, and stand-alone pages. If these pages do not work, set this to I use nginx
Author: creadunet
Last update: 2017-02-05 18:14