11/30/18

script GetCountMahasiswa di webservice 2.2 PDDIKTI

script GetCountMahasiswa di webservice 2.2 PDDIKTI


//init
$ch2 = curl_init();
curl_setopt($ch2,CURLOPT_HTTPHEADER,$headers);

//run function GetCountMahasiswa
$data=array('act'=>'GetCountMahasiswa','token'=>$token);
$data=json_encode($data);
curl_setopt($ch2,CURLOPT_POSTFIELDS,$data);

curl_setopt($ch2,CURLOPT_URL,$url);
curl_setopt($ch2,CURLOPT_RETURNTRANSFER,1);
$result = curl_exec($ch2);

//json
$data=json_decode($result);

//tampilkan data
echo "<br>Jumlah Mahasiswa : " . $data->data;


cara tracking pengiriman lewat USPS

silahkan ke url :

https://tools.usps.com/go/TrackConfirmAction_input


masukan nomer tracking number nya dikolom yg tersedia


GetKRSMahasiswa webSERVICE 2.2

//untuk filter
$filter="id_registrasi_mahasiswa='" . trim($vId_reg_pd) ;
$filter=$filter . "' and id_kelas='" . trim($rs212['id_kls']) ;
$filter=$filter . "' and kode_mata_kuliah='" . trim($rs2['kode_kul']) . "'";

//run function nya
$data=array('act'=>'GetKRSMahasiswa','token'=>$token,'filter'=>$filter);

//masukkan ke json
$data=json_encode($data) ;
curl_setopt($ch2,CURLOPT_POSTFIELDS,$data);

curl_setopt($ch2,CURLOPT_URL,$url);
curl_setopt($ch2,CURLOPT_RETURNTRANSFER,1);
$result = curl_exec($ch2);
$data=json_decode($result);

if ($data->error_code!="0")
{
echo "<td>error->" . $data->error_code . "</td>";
};
else
{
if (empty($data->data) )
{
echo "KRS Blm Ada";
}
        else
{
echo "KRS Sudah Ada" ;
                echo "Periode : " . $data->data[0]->id_periode;
                echo "Kode : " . $data->data[0]->kode_mata_kuliah;
                echo "NamaMatKUL : " . $data->data[0]->nama_mata_kuliah;
}
}


Postingan Lebih Baru Postingan Lama