Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ip = $_SERVER['REMOTE_ADDR'];
- $name = $_POST['name'];
- $phone = $_POST['phone'];
- $web_id = '32632'; //Ваш ID в системе
- $api_key = '7b3856e92f80b8051be1dd5e3ab8c516'; //API ключ
- $product_id = '7055'; //ID оффера в системе
- $params = array(
- 'ref' => $web_id,
- 'api_key' => $api_key,
- 'product_id' => $product_id,
- 'ip' => $ip,
- 'phone' => $phone,
- 'name' => $name
- );
- if($curl = curl_init()){
- curl_setopt($curl, CURLOPT_URL, 'http://m1-shop.ru/send_order');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
- $resp = curl_exec($curl);
- curl_close($curl);
- }
- header ('Location: success.html');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement