Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sql = mysql_query("SELECT * FROM api_orders_shakes WHERE out_order_id = '$_GET[out_order_id]' LIMIT 1");
- $record = mysql_fetch_array($sql);
- $time = date('Y-m-d H:i:s', $record[order_date]);
- $data = array(
- "name" => "$record[fio]",
- "phone" => "$record[phone]",
- "countryCode" => "$record[country]",
- "comment" => "",
- "number" => "$record[number]",
- "offerId" => "$record[offerId]",
- "landingUrl" => "$record[referer]",
- "createdAt" => "$time",
- "sub1" => "$record[utm_source]",
- "sub2" => "$record[utm_content]",
- "sub3" => "$record[utm_medium]",
- "sub4" => "$record[utm_term]",
- "userAgent" => "$record[ua]",
- "ip" => "$record[ip]"
- );
- if ($curl = curl_init()){
- curl_setopt($curl, CURLOPT_URL, 'http://shakes.pro/index.php?r=api/order/in&key=082ff121d6892acfcc61345ff71acb88');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
- $result = curl_exec($curl);
- }
- $json = json_decode($result);
- $shakes_result = $json->{'status'};
- $shakes_message = $json->{'response'};
- echo "<br><br>";
- echo $shakes_result;
- echo "<br><br>";
- echo $shakes_message;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement