Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Данные для передачи
- $name = $_POST['name'];
- $phone = $_POST['phone'];
- $flow = '5LVV'; //Код потока
- $token = '4c24536a4c7c325743526d25636c7b47'; //Token
- $country = 'ro'; //Код страны
- $landing = $_POST['landing']; //Ссылка на лендинг в системе
- $referrer = 'http://healthynewsworld.club'; //Ссылка на лендинг с которого льете
- $params = array(
- 'name' => $name,
- 'phone' => $phone,
- 'landing' => $landing,
- 'flow_hash' => $flow,
- 'country' => $country,
- 'referrer' => $referrer
- );
- if (!empty($_POST['phone'])) {
- send_the_order ($_POST);
- }
- function send_the_order ($post){
- $params=array(
- 'flow_hash' => $post['flow_hash'],
- 'landing' => $post['landing'],
- 'referrer' => $post['referrer'],
- 'phone' => $post['phone'],
- 'name' => $post['name'],
- 'country' => $post['country'],
- );
- $url = 'http://leadbit.com/api/new-order/{token}';
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
- curl_setopt($ch, CURLOPT_REFERER, $url);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
- $return= curl_exec($ch);
- curl_close($ch);
- $array=json_decode($return, true);
- header('Location:'.$post['success_page']);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement