Advertisement
AlexM1SHOP

Untitled

Oct 12th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. $ip = $_SERVER['REMOTE_ADDR'];
  2. $name = $_POST['name'];
  3. $phone = $_POST['phone'];
  4. $web_id = '32632'; //Ваш ID в системе
  5. $api_key = '7b3856e92f80b8051be1dd5e3ab8c516'; //API ключ
  6. $product_id = '7055'; //ID оффера в системе
  7. $params = array(
  8. 'ref' => $web_id,
  9. 'api_key' => $api_key,
  10. 'product_id' => $product_id,
  11. 'ip' => $ip,
  12. 'phone' => $phone,
  13. 'name' => $name
  14. );
  15. if($curl = curl_init()){
  16. curl_setopt($curl, CURLOPT_URL, 'http://m1-shop.ru/send_order');
  17. curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
  18. curl_setopt($curl, CURLOPT_POST, true);
  19. curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
  20. $resp = curl_exec($curl);
  21. curl_close($curl);
  22. }
  23. header ('Location: success.html');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement