Commit 0a7e6077 authored by Indra Raja's avatar Indra Raja

trial webhook

parent da8aceac
......@@ -56,35 +56,34 @@ class AdminController extends \Application\Master\GlobalActionController
$id = $getpath[3];
// $curl = curl_init();
// curl_setopt_array($curl, array(
// CURLOPT_URL => "http://queue.indra/api/nextantrian",
// CURLOPT_RETURNTRANSFER => true,
// CURLOPT_ENCODING => "",
// CURLOPT_MAXREDIRS => 10,
// CURLOPT_TIMEOUT => 0,
// CURLOPT_FOLLOWLOCATION => true,
// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
// CURLOPT_CUSTOMREQUEST => "POST",
// CURLOPT_POSTFIELDS => array('inoantrian' => '7','idok' => '74','istatus' => '40'),
// ));
// $response = curl_exec($curl);
// curl_close($curl);
// echo $response;
// $data = json_decode(file_get_contents('php://input'),true);
// echo $data;
// print_r($data);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://queue.indra/api/nextantrian",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('inoantrian' => '7','idok' => '74','istatus' => '40'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
$data = $this->getRequest()->getPost('');
print_r($data);
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var id = "' . $id . '"');
$this->headScript->appendFile('/action-js/antrian-js/action-admin.js');
$this->layout("layout/layoutAdmin");
$this->layout("slayout/layoutAdmin");
return $view;
}
public function registrasidokterAction()
......
......@@ -53,7 +53,27 @@ class UmumController extends \Application\Master\GlobalActionController
// echo "<pre>";
$decodeid = base64_decode($getpath[3]);
curl_setopt_array($curl, array(
CURLOPT_URL => "http://queue.indra/api/nextantrian",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('inoantrian' => '7','idok' => '74','istatus' => '40'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
// $data = $this->getRequest()->getRawBody();
// print_r($data);
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment