This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * Revised Postback Example Script. | |
| * | |
| * This script demonstrates a more secure and robust way of handling a postback. | |
| * Please ensure you modify it according to your specific requirements. | |
| */ | |
| // Database credentials | |
| define("DB_HOST", "localhost"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "status": "success", | |
| "total": 2, | |
| "reversals": [ | |
| { | |
| "id": 1, | |
| "subid": "127.0.0.1", | |
| "ip": "127.0.0.1", | |
| "country": "US", | |
| "amount": 1.23, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "status": "success", | |
| "total": 2, | |
| "conversions": [ | |
| { | |
| "amount": 1.23, | |
| "offer_id": 1321, | |
| "country": "US", | |
| "timestamp": 1699978573 | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>CPAlead JSON API Example</title> | |
| <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.1.3/css/bootstrap.min.css" integrity="sha384-1BmE4kP5vv0mR4KZaZ+5n5zRr+Zj8q8F2FwXqPWHKE5CkZK3uHZF6nIncHUz8d2T" crossorigin="anonymous"> | |
| <style> | |
| body { padding-top: 50px; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "status": "success", | |
| "number_offers": 2, | |
| "country": "US", | |
| "devices": null, | |
| "offers": [ | |
| { | |
| "id": 1129, | |
| "title": "World Of Tanks", | |
| "description": "Complete Bootcamp And Get Next Level Tank (New Users Only)", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Purchase form: http://your-site.com/purchase.php?click_id={CLICK_ID} - parameter click_id={CLICK_ID} is required for purchase | |
| if($_REQUEST['type'] == 'purchase') { | |
| // Getting data from purchase page. Is your job to filter fake purchases | |
| if(is_purchase_is_valid() == 1) { // is_purchase_is_valid() - that is validation function in your system | |
| $click_id = $_POST['click_id']; // Here is click_id from submitted form | |
| curl_setopt_array($curl, array( | |
| CURLOPT_RETURNTRANSFER => 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Sign up form: http://your-site.com/signup.php?click_id={CLICK_ID} - parameter click_id={CLICK_ID} is required for sign up | |
| if($_REQUEST['type'] == 'sign_up') { | |
| // Getting data from sign up and validating it. Is your job to filter fake sign ups / purchases | |
| if(is_user_valid() == 1) { // is_user_valid() - that is validation function in your system | |
| $click_id = $_POST['click_id']; // Here is click_id from submitted form | |
| curl_setopt_array($curl, array( | |
| CURLOPT_RETURNTRANSFER => 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| This is /medical-billing-signup page. Tracking URL to that page should be: | |
| https://www.bikham.com/medical-billing-signup/?click_id={CLICK_ID}&publisher_id={PUBLISHER_ID} - it is set in CPAlead advertising panel. | |
| On that page, in form is attached click_id value, from $_GET['click_id'] parameter. It is added in hidden input and sent to form execution function. | |
| */ | |
| // ... Here is any code ... | |
| // Here is form receiver function - where is processes data from form: (Can be in another file, in example is POST method) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Sign up form: http://your-site.ru/signup.php?click_id={CLICK_ID} - parameter click_id={CLICK_ID} is required for page, where shoudl be done conversion (sign up / complete form) | |
| if($_REQUEST['type'] == 'sign_up') { | |
| // Getting values from form and valiadation them. Sometime can be fake value, like fdsudf@dsfsd.com | |
| if(is_data_valid() == 1) { // is_user_valid() - this is your function for validating | |
| $click_id = $_POST['click_id']; // click_id from form which we submitted. | |
| curl_setopt_array($curl, array( | |
| CURLOPT_RETURNTRANSFER => 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Форма регистрации: http://your-site.ru/signup.php?click_id={CLICK_ID} - параметр click_id={CLICK_ID} обязателен для ссылки на страницу регистрации | |
| if($_REQUEST['type'] == 'sign_up') { | |
| // Получаем данные с формы и проверяем все на валидность. Иногда бывает фейковый трафик с email типа fdsudf@dsfsd.com | |
| if(is_user_valid() == 1) { // is_user_valid() - это ваша кастомная функция валидации пользователя | |
| $click_id = $_POST['click_id']; // Тот самый click_id с формы |
NewerOlder