Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->load->library('curl');
- header('Content-Type: application/json');
- $nik = '3320015809580001';
- $post = [
- 'user_id' => 'DISPERKIM',
- 'password' => 'rumah',
- 'nik' => $nik,
- ];
- $ch = curl_init('http://222.124.25.110:8000/dukcapil/get_json/DISPERKIM/NIK'); // Link API Dukcapil
- curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json'));
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
- $curl_response = curl_exec($ch);
- curl_close($ch);
- $curl_jason = json_decode($curl_response, true);
- print_r($curl_jason);
Add Comment
Please, Sign In to add comment