<?php



	$uname ="saeed200990";
	$pass ="123456";
	$from ="100009";
	$message ="";
	$time ="";
	$uinqid ="";
	$fileUrl ="";
	$url = "37.130.202.188/services.jspd";
	$rcpt_nm = array('09149049445','09148878689');
	if(isset($_POST['msg']) && $_POST['msg'] !== "" ){
		$gettype  = filterbug($_POST['msg']);
	
	
	
	if(isset($_POST['from']) && $_POST['from'] !== ""){
		
			$from = $_POST['from'];
	}
	
	if(isset($_POST['message']) && $_POST['message'] !== ""){
		
			$message = $_POST['message'];
	}
	
	if(isset($_POST['time']) && $_POST['time'] !== ""){
		
			$time = $_POST['time'];
	}
	
	if(isset($_POST['uinqid']) && $_POST['uinqid'] !== ""){
		
			$uinqid = $_POST['uinqid'];
	}
	
	if(isset($_POST['fileUrl']) && $_POST['fileUrl'] !== ""){
		
			$fileUrl = $_POST['fileUrl'];
	}
	
	if(isset($_POST['rcpt_nm']) && $_POST['rcpt_nm'] !== ""){
		
			$rcpt_nm = $_POST['rcpt_nm'];
	}
	
	
	

$credit = array('uname'=>$uname,'pass'=>$pass,'op'=>'credit');
$inboxlist = array('uname'=>$uname,'pass'=>$pass,'op'=>'inboxlist');
$deleteperiod = array('uname'=>$uname,'pass'=>$pass,'id'=>'','op'=>'deleteperiod');
$delivery = array('uname'=>$uname,'pass'=>$pass,'op'=>'delivery','uinqid'=>$uinqid);
$ptop = array('uname'=>$uname,'pass'=>$pass,'from'=>$from,'message'=>json_encode(array('test1','test2')),'to'=>json_encode($rcpt_nm),'op'=>'send');
$period = array('uname'=>$uname,'pass'=>$pass,'from'=>$from,'message'=>$message,'to'=>json_encode($rcpt_nm),'time' => $time,'op'=>'send');
$sms = array('uname'=>$uname,'pass'=>$pass,'from'=>$from,'message'=>$message,'to'=>json_encode($rcpt_nm),'op'=>'send');
$sendvoice = array('uname'=>$uname,'pass'=>$pass,'repeat'=>'1', 'to'=>json_encode($rcpt_nm),'fileUrl'=>$fileUrl,'op'=>'sendvoice' );





$handler = curl_init($url);             
curl_setopt($handler, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($handler, CURLOPT_POSTFIELDS, $$gettype);                       
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
$response2 = curl_exec($handler);

$response2 = json_decode($response2);

$res_code = $response2[0];
$res_data = $response2[1];


echo $res_data;




function filterbug($param){
	
	return $param;
}


}else{
	
	}

?>
