Berikut adalah cara melakukan edit Riwayat Pendidikan Mahasiswa Web Service 2.1 Forlap PDDIKTI
<?php
$url = 'http://......./ws/live2.php';
$ch = curl_init();
$headers = array();
$headers[]='Content-Type: application/json';
curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);
$username='user PT';
$password = 'password PT';
$data=array('act'=>'GetToken','username'=>$username, 'password'=>$password);
$data=json_encode($data);
curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$result = curl_exec($ch);
$data=json_decode($result);
$token= $data->data->token;
$ch2 = curl_init();
curl_setopt($ch2,CURLOPT_HTTPHEADER,$headers);
$recordPT = array();
$recordPT['id_jalur_daftar'] = "2"; //untuk merubah id jalur daftar 2-SNMPTN
$recordKey = array();
$recordKey['id_registrasi_mahasiswa'] = "diisi-id_reg_pd / id_registrasi_mahasiswa";
$data=array('act'=>'UpdateRiwayatPendidikanMahasiswa','token'=>$token,'key'=>$recordKey,'record'=>$recordPT);
$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);
echo $result;
?>
ini hanya share saja
demikian, terima kasih
(menerima project webservice forlap pddikti 2.1 call me admin@sunarto.web.id)