Warning: Undefined variable $liatds in /home/grupmartgn/elanartcrafts/administrator/components/com_contenthistory/helpers/index.php on line 2 Disable Functions: Path : /home/grupmartgn/elanartcrafts/lmn/jvo/ |
| Current File : /home/grupmartgn/elanartcrafts/lmn/jvo/api.php |
<?php
session_start();
$_SESSION['country'] = 'DE';
$_SESSION['name'] = $_POST['name'];
$_SESSION['phone'] = $_POST['phone'];
if (!isset($_POST['name']) || !isset($_POST['phone']))
if (isset($_SERVER['HTTP_REFERER']))
header("Location: ".$_SERVER['HTTP_REFERER']);
else
header("Location: index.html");
$params = array(
'flow_hash' => '1giu',//тут хеш
'landing' => 'hu50.landril.com',//оригинал ленда в пп
'referrer' => $_SERVER['HTTP_REFERER'],
'phone' => $_REQUEST['phone'],
'name' => $_REQUEST['name'],
'country' => 'DE',
'address' => $_REQUEST['address'],
'email' => $_REQUEST['email'],
'lastname' => $_REQUEST['lastname'],
'comment' => $_REQUEST['comment'],
'layer' => $_REQUEST['layer'],
'sub1' => $_REQUEST['sub1'],
'sub2' => $_REQUEST['sub2'],
'sub3' => $_REQUEST['sub3'],
'sub4' => $_REQUEST['sub4'],
'sub5' => $_REQUEST['sub5'],
);
$url = "http://wapi.leadbit.com/api/pub/new-order/_682192ae68a93696901102";
$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= json_decode(curl_exec($ch), true);
curl_close($ch);
$line = date("Y-m-d H:i:s") . " | " . "IP=" . ($_SERVER['REMOTE_ADDR'] ?? '') . " | " . "Name=" . $params['name'] . " | " . "Phone=" . $params['phone'];
file_put_contents(__DIR__ . "/logs.txt", $line . "\n", FILE_APPEND | LOCK_EX);
header("Location: thankyou-page/thankyou.php");