Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!empty($_POST['phone'])) {
- send_the_order ($_POST);
- }
- function send_the_order ($post){
- $params=array(
- 'flow_hash' => $post['7yjV'],
- 'landing' => $post['hondrocream-health.com'],
- 'phone' => $post['phone'],
- 'name' => $post['name'],
- 'country' => $post['IT'],
- 'referrer' => $post['referrer'],
- 'address' => $post['address'],
- 'email' => $post['email'],
- 'lastname' => $post['lastname'],
- 'comment' => $post['comment'],
- 'layer' => $post['layer'],
- 'sub1' => $post['sub1'],
- 'sub2' => $post['sub2'],
- 'sub3' => $post['sub3'],
- 'sub4' => $post['sub4'],
- 'sub5' => $post['sub5'],
- );
- $url = 'http://leadbit.com/api/conversion/new-from-form';
- $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