<?php
$_POST = json_decode(file_get_contents('php://input'), true);
$data = $_POST;
if (!empty($data['id'])) {
$data['type'] = $_GET['type'];
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://tstdrv2353842.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=827&deploy=2&compid=TSTDRV2353842&h=ac7c8e9778d66cb92ffc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30000,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => array(
"accept: */*",
"accept-language: en-US,en;q=0.8",
"content-type: application/json",
"User-Agent: Mozilla/5.0"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
// if ($err) {
// echo "cURL Error #:" . $err;
// } else {
// print_r(json_decode($response));
// print_r('hhhh');
// }
}
?>