Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php $query = "SELECT * FROM config"; $result = mysqli_query($conn, $query); $row = m..

Decoded Output download

<?php  
$query = "SELECT * FROM config"; 
$result = mysqli_query($conn, $query); 
$row = mysqli_fetch_assoc($result); 
/////---------------------------///////////// 
$allowed_domain = "localhost"; 
$current_domain = $_SERVER['HTTP_HOST']; 
 
if ($current_domain !== $allowed_domain) { 
    die("<header class='intro'> 
    <div class='intro-body'> 
        <style> 
            /* Kode CSS Anda di sini */ 
            @import url('https://fonts.googleapis.com/css?family=Montserrat'); 
            * { 
                margin: 0; 
                padding: 0; 
                box-sizing: border-box; 
            } 
            body { 
                font-family: 'Montserrat', sans-serif; 
                background-color: #000; 
                color: #fff; 
            } 
            .intro { 
                height: 100vh; 
                display: flex; 
                justify-content: center; 
                align-items: center; 
                text-align: center; 
                letter-spacing: 0.1rem; 
                background: linear-gradient(45deg, #ffcc5c 20%, #3c3c3c 20% 50%, #ff6f69 50% 80%, #96ceb4 80%); 
            } 
            .intro-body { 
                border: 5px solid #fff; 
                padding: 2rem 3rem; 
                background-color: rgba(0,0,0,0.2); 
            } 
            .intro h1 { 
                font-size: 4rem; 
                margin-bottom: 0.75rem; 
            } 
            .intro p { 
                font-size: 1.75rem; 
            } 
            @media (max-width: 700px) { 
                html { font-size: 12px; } 
                .intro-body { border: 3px solid #fff; padding: 1.5rem 2rem; } 
                .intro h1 { font-size: 2.5rem; } 
                .intro p { font-size: 1.25rem; } 
            } 
            button { 
                font-family: sans-serif; 
                font-size: 15px; 
                background: #22a4cf; 
                color: white; 
                border: white 3px solid; 
                border-radius: 5px; 
                padding: 12px 20px; 
                margin-top: 10px; 
            } 
            button:hover { 
                opacity: 0.9; 
            } 
        </style> 
 
        <p>&#8987 SOURCE CODE DI KUNCI &#8987;</p> 
        <br/> 
        <p>===============================================</p> 
        <br/> 
        <p>&#128260 SOURCE CODE DI KUNCI &#128260;</p> 
        <p>&#128260 SOURCE CODE DI KUNCI &#128260;</p> 
        <p>&#128260 SOURCE CODE DI KUNCI &#128260;</p> 
        <p>&#128260 SOURCE CODE DI KUNCI &#128260;</p> 
        <br/> 
        <p>===============================================</p> 
        <br/> 
         
        <body> 
            <a href='https://wa.me/6285890557246' target='_blank'> 
                <button class='button'>Hubungi Riki Yuliana</button> 
            </a> 
        </body> 
    </div> 
</header>"); 
} 
////----------------------------///////////// 
$maintenanceValue = $row['maintenance']; 
$maintenance = 1; // Maintenance? 1 = ya 0 = tidak 
if($maintenance == $maintenanceValue) { 
	die("<header class='intro'> 
            <div class='intro-body'> 
                <style> 
                    /* Kode CSS Anda di sini */ 
                    @import url('https://fonts.googleapis.com/css?family=Montserrat'); 
                    * { 
                        margin: 0; 
                        padding: 0; 
                        box-sizing: border-box; 
                    } 
                    body { 
                        font-family: 'Montserrat', sans-serif; 
                        background-color: #000; 
                        color: #fff; 
                    } 
                    .intro { 
                        height: 100vh; 
                        display: flex; 
                        justify-content: center; 
                        align-items: center; 
                        text-align: center; 
                        letter-spacing: 0.1rem; 
                        background: linear-gradient(45deg, #ffcc5c 20%, #3c3c3c 20% 50%, #ff6f69 50% 80%, #96ceb4 80%); 
                    } 
                    .intro-body { 
                        border: 5px solid #fff; 
                        padding: 2rem 3rem; 
                        background-color: rgba(0,0,0,0.2); 
                    } 
                    .intro h1 { 
                        font-size: 4rem; 
                        margin-bottom: 0.75rem; 
                    } 
                    .intro p { 
                        font-size: 1.75rem; 
                    } 
                    @media (max-width: 700px) { 
                        html { font-size: 12px; } 
                        .intro-body { border: 3px solid #fff; padding: 1.5rem 2rem; } 
                        .intro h1 { font-size: 2.5rem; } 
                        .intro p { font-size: 1.25rem; } 
                    } 
                    button { 
                        font-family: sans-serif; 
                        font-size: 15px; 
                        background: #22a4cf; 
                        color: white; 
                        border: white 3px solid; 
                        border-radius: 5px; 
                        padding: 12px 20px; 
                        margin-top: 10px; 
                    } 
                    button:hover { 
                        opacity: 0.9; 
                    } 
                </style> 
     
                <p>&#8987 PERSIAPAN MAINTANCE &#8987;</p> 
                <br/> 
                <p>===============================================</p> 
                <br/> 
                <p>&#128260 APLIKASI DAN WEBSITE SEDANG MAINTANCE &#128260;</p> 
                <p>&#128260 APLIKASI DAN WEBSITE SEDANG MAINTANCE &#128260;</p> 
                <p>&#128260 APLIKASI DAN WEBSITE SEDANG MAINTANCE &#128260;</p> 
                <p>&#128260 APLIKASI DAN WEBSITE SEDANG MAINTANCE &#128260;</p> 
                <br/> 
                <p>===============================================</p> 
                <br/> 
                 
                <body> 
                    <a href='https://wa.me/6285890557246' target='_blank'> 
                        <button class='button'>Hubungi Riki Yuliana</button> 
                    </a> 
                </body> 
            </div> 
        </header>"); 
} 
//////////////////////////////////////// 
function get_remember($cookie_token) { 
    session_start(); 
    global $conn; 
     
    $data = $conn->query("SELECT * FROM users WHERE cookie_token='".$cookie_token."'"); 
    $hasil = $data->fetch_assoc(); 
     
    if($data->num_rows > 0) { 
       $_SESSION['user'] = $hasil; 
   } 
    
} 
 
function tanggal_indo($tanggal) 
{ 
    $bulan = array (1 =>   'Januari', 
        'Februari', 
        'Maret', 
        'April', 
        'Mei', 
        'Juni', 
        'Juli', 
        'Agustus', 
        'September', 
        'Oktober', 
        'November', 
        'Desember' 
    ); 
    $split = explode('-', $tanggal); 
    return $split[2] . ' ' . $bulan[ (int)$split[1] ] . ' ' . $split[0]; 
} 
 
function filter($data){ 
 
    $filter = stripslashes(strip_tags(htmlspecialchars(htmlentities($data,ENT_QUOTES)))); 
 
    return $filter; 
 
} 
 
function acak($length) { 
    $str = ""; 
    $karakter = array_merge(range('A','Z'), range('a','z'), range('1','9')); 
    $max_karakter = count($karakter) - 1; 
    for ($i = 0; $i < $length; $i++) { 
        $rand = mt_rand(0, $max_karakter); 
        $str .= $karakter[$rand]; 
    } 
    return $str; 
} 
 
function acak_nomor($length) { 
    $str = ""; 
    $karakter = array_merge(range('1','9')); 
    $max_karakter = count($karakter) - 1; 
    for ($i = 0; $i < $length; $i++) { 
        $rand = mt_rand(0, $max_karakter); 
        $str .= $karakter[$rand]; 
    } 
    return $str; 
} 
 
function time_elapsed_string($datetime, $full = false) { 
    $now = new DateTime; 
    $ago = new DateTime($datetime); 
    $diff = $now->diff($ago); 
 
    $diff->w = floor($diff->d / 7); 
    $diff->d -= $diff->w * 7; 
 
    $string = array( 
        'y' => 'Tahun', 
        'm' => 'Bulan', 
        'w' => 'Minggu', 
        'd' => 'Hari', 
        'h' => 'Jam', 
        'i' => 'Menit', 
        's' => 'Detik', 
    ); 
    foreach ($string as $k => &$v) { 
        if ($diff->$k) { 
            $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? '' : ''); 
        } else { 
            unset($string[$k]); 
        } 
    } 
 
    if (!$full) $string = array_slice($string, 0, 1); 
    return $string ? implode(', ', $string) . ' Yang Lalu' : 'Baru Saja'; 
} 
 
function get_client_ip() { 
    $ipaddress = ''; 
    if (getenv('HTTP_CLIENT_IP')) { 
        $ipaddress = getenv('HTTP_CLIENT_IP'); 
    } elseif (getenv('HTTP_X_FORWARDED_FOR')) { 
        $ipaddress = getenv('HTTP_X_FORWARDED_FOR'); 
    } elseif (getenv('HTTP_X_FORWARDED')) { 
        $ipaddress = getenv('HTTP_X_FORWARDED'); 
    } elseif (getenv('HTTP_FORWARDED_FOR')) { 
        $ipaddress = getenv('HTTP_FORWARDED_FOR'); 
    } elseif (getenv('HTTP_FORWARDED')) { 
        $ipaddress = getenv('HTTP_FORWARDED'); 
    } elseif (getenv('REMOTE_ADDR')) { 
        $ipaddress = getenv('REMOTE_ADDR'); 
    } else { 
        $ipaddress = 'UNKNOWN'; 
    } 
    return $ipaddress; 
} 
$client_ip = get_client_ip(); 
 
function validate_date($date) { 
    $d = DateTime::createFromFormat('Y-m-d', $date); 
    return $d && $d->format('Y-m-d') == $date; 
} 
 
function infojson($url) { 
    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 
    $data = curl_exec($ch); 
    curl_close($ch); 
    return $data; 
} 
 
function Show($tabel, $limit) { 
    global $conn; 
    $CallData = mysqli_query($conn, "SELECT * FROM ".$tabel." WHERE ".$limit); 
    $ThisData = mysqli_fetch_assoc($CallData); 
    return $ThisData; 
} 
 
function followers_count($data){ 
    $id = file_get_contents("https://instagram.com/web/search/topsearch/?query=".$data); 
    $id = json_decode($id, true); 
    $count = $id['users'][0]['user']['follower_count']; 
    return $count; 
} 
 
function likes_count($data){ 
    $id = file_get_contents("".$data."?&__a=1"); 
    $id = json_decode($id, true); 
    $count = $id['graphql']['shortcode_media']['edge_media_preview_like']['count']; 
    return $count; 
} 
 
function views_count($data){ 
    $id = file_get_contents("".$data."?&__a=1"); 
    $id = json_decode($id, true); 
    $count = $id['graphql']['shortcode_media']['video_view_count']; 
    return $count; 
} 
 
function get_client_browser() { 
    $browser = ''; 
    if (strpos($_SERVER['HTTP_USER_AGENT'], 'Netscape')) 
        $browser = 'Netscape'; 
    else if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox')) 
        $browser = 'Firefox'; 
    else if (strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome')) 
        $browser = 'Chrome'; 
    else if (strpos($_SERVER['HTTP_USER_AGENT'], 'Opera')) 
        $browser = 'Opera'; 
    else if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) 
        $browser = 'Internet Explorer'; 
    else 
        $browser = 'Other'; 
    return $browser; 
} 
function get_client_os() { 
    $user_agent = $_SERVER['HTTP_USER_AGENT']; 
    $os = ''; 
 
    if (preg_match('/windows/i', $user_agent)) { 
        $os = 'Windows'; 
        preg_match('/Windows NT (\d+\.\d+)/', $user_agent, $matches); 
        if (!empty($matches[1])) { 
            $os .= ' ' . $matches[1]; 
        } 
    } elseif (preg_match('/macintosh|mac os x/i', $user_agent)) { 
        $os = 'Mac'; 
        preg_match('/Mac OS X (\d+[\._]\d+[\._]\d+)/', $user_agent, $matches); 
        if (!empty($matches[1])) { 
            $os .= ' ' . str_replace('_', '.', $matches[1]); 
        } 
    } elseif (preg_match('/linux/i', $user_agent)) { 
        $os = 'Linux'; 
    } elseif (preg_match('/ubuntu/i', $user_agent)) { 
        $os = 'Ubuntu'; 
    } elseif (preg_match('/iphone/i', $user_agent)) { 
        $os = 'iPhone'; 
        preg_match('/iPhone OS (\d+_\d+)/', $user_agent, $matches); 
        if (!empty($matches[1])) { 
            $os .= ' ' . str_replace('_', '.', $matches[1]); 
        } 
    } elseif (preg_match('/ipad/i', $user_agent)) { 
        $os = 'iPad'; 
        preg_match('/iPad OS (\d+_\d+)/', $user_agent, $matches); 
        if (!empty($matches[1])) { 
            $os .= ' ' . str_replace('_', '.', $matches[1]); 
        } 
    } elseif (preg_match('/android/i', $user_agent)) { 
        $os = 'Android'; 
        preg_match('/Android (\d+[\._]\d+)/', $user_agent, $matches); 
        if (!empty($matches[1])) { 
            $os .= ' ' . str_replace('_', '.', $matches[1]); 
        } 
    } elseif (preg_match('/blackberry/i', $user_agent)) { 
        $os = 'BlackBerry'; 
        preg_match('/BlackBerry (\d+)/', $user_agent, $matches); 
        if (!empty($matches[1])) { 
            $os .= ' ' . $matches[1]; 
        } 
    } elseif (preg_match('/webos/i', $user_agent)) { 
        $os = 'Mobile'; 
    } else { 
        $os = 'Other'; 
    } 
 
    return $os; 
} 
function get_client_provider($ip) { 
    $provider = ''; 
 
    if (!empty($ip) && $ip != 'IP tidak dikenali') { 
        $url = 'https://ipapi.co/' . $ip . '/org/'; 
        $response = file_get_contents($url); 
        $provider = trim($response); 
    } 
 
    return $provider; 
} 
include_once 'MobileDetect.class.php';  
  
 
$mdetect = new MobileDetect();  
$desktopDetected = ''; // Inisialisasi variabel di luar blok else 
 
if ($mdetect->isMobile()) {  
    // Detect mobile/tablet   
    if ($mdetect->isTablet()) {  
        $desktopDetected = 'Perangkat Tablet Terdeteksi!<br/>';  
    } else {  
        $desktopDetected = 'Perangkat Seluler Terdeteksi!<br/>';  
    }  
     
    // Detect platform  
    if ($mdetect->isiOS()) {  
        $desktopDetected = 'IOS';  
    } elseif ($mdetect->isAndroidOS()) {  
        $desktopDetected = 'ANDROID';  
    }  
} else {  
    $desktopDetected = 'Desktop Terdeteksi!';  
} 
 
 
// ===== Data Logo ===== // 
$cek_logo = $conn->query("SELECT * FROM kontak_website"); 
$data_logo = mysqli_fetch_assoc($cek_logo); 
// ===== ============ ===== // 
$user_agent = $_SERVER['HTTP_USER_AGENT']; 
 
$exploded = explode(';', $user_agent); 
 
if (isset($exploded[2])) { 
    $series_perangkat = trim($exploded[2]); 
} else { 
    $series_perangkat = 'Tidak ada data yang cocok'; 
} 
 
 
function getBrowser() {  
  $u_agent = $_SERVER['HTTP_USER_AGENT']; 
  $bname = 'Unknown'; 
  $platform = 'Unknown'; 
  $version= ""; 
 
  //First get the platform? 
  if (preg_match('/linux/i', $u_agent)) { 
    $platform = 'linux'; 
  }elseif (preg_match('/macintosh|mac os x/i', $u_agent)) { 
    $platform = 'mac'; 
  }elseif (preg_match('/windows|win32/i', $u_agent)) { 
    $platform = 'windows'; 
  } 
 
  // Next get the name of the useragent yes seperately and for good reason 
  if(preg_match('/MSIE/i',$u_agent) && !preg_match('/Opera/i',$u_agent)){ 
    $bname = 'Internet Explorer'; 
    $ub = "MSIE"; 
  }elseif(preg_match('/Firefox/i',$u_agent)){ 
    $bname = 'Mozilla Firefox'; 
    $ub = "Firefox"; 
  }elseif(preg_match('/OPR/i',$u_agent)){ 
    $bname = 'Opera'; 
    $ub = "Opera"; 
  }elseif(preg_match('/Chrome/i',$u_agent) && !preg_match('/Edge/i',$u_agent)){ 
    $bname = 'Google Chrome'; 
    $ub = "Chrome"; 
  }elseif(preg_match('/Safari/i',$u_agent) && !preg_match('/Edge/i',$u_agent)){ 
    $bname = 'Apple Safari'; 
    $ub = "Safari"; 
  }elseif(preg_match('/Netscape/i',$u_agent)){ 
    $bname = 'Netscape'; 
    $ub = "Netscape"; 
  }elseif(preg_match('/Edge/i',$u_agent)){ 
    $bname = 'Edge'; 
    $ub = "Edge"; 
  }elseif(preg_match('/Trident/i',$u_agent)){ 
    $bname = 'Internet Explorer'; 
    $ub = "MSIE"; 
  } 
 
  // finally get the correct version number 
  $known = array('Version', $ub, 'other'); 
  $pattern = '#(?<browser>' . join('|', $known) . 
')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#'; 
  if (!preg_match_all($pattern, $u_agent, $matches)) { 
    // we have no matching number just continue 
  } 
  // see how many we have 
  $i = count($matches['browser']); 
  if ($i != 1) { 
    //we will have two since we are not using 'other' argument yet 
    //see if version is before or after the name 
    if (strripos($u_agent,"Version") < strripos($u_agent,$ub)){ 
        $version= $matches['version'][0]; 
    }else { 
        $version= $matches['version'][1]; 
    } 
  }else { 
    $version= $matches['version'][0]; 
  } 
 
  // check if we have a number 
  if ($version==null || $version=="") {$version="?";} 
 
  return array( 
    'userAgent' => $u_agent, 
    'name'      => $bname, 
    'version'   => $version, 
    'platform'  => $platform, 
    'pattern'    => $pattern 
  ); 
}  
// now try it 
$ua=getBrowser(); 
$yourbrowser= "Your browser: " . $ua['name'] . " " . $ua['version'] . " on " .$ua['platform'] . " reports: <br >" . $ua['userAgent']; 
 
//echo "browser: " . $user_agent . "<br>"; 
 
$browser = get_client_browser(); 
$operating_system = get_client_os(); 
 
$provider = get_client_provider($ip); 
///////////// 
function kirimPesanWhatsApp($api_key, $sender, $number, $message) { 
    $data = [ 
        'api_key' => $api_key, 
        'sender' => $sender, 
        'number' => $number, 
        'message' => $message, 
    ]; 
 
    $curl = curl_init(); 
 
    curl_setopt_array($curl, array( 
        CURLOPT_URL => 'https://wa.botgateway.my.id/send-message', 
        CURLOPT_RETURNTRANSFER => true, 
        CURLOPT_ENCODING => '', 
        CURLOPT_MAXREDIRS => 10, 
        CURLOPT_TIMEOUT => 0, 
        CURLOPT_FOLLOWLOCATION => true, 
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 
        CURLOPT_CUSTOMREQUEST => 'POST', 
        CURLOPT_POSTFIELDS => json_encode($data), 
        CURLOPT_HTTPHEADER => array( 
            "Content-Type: application/json" 
        ), 
    )); 
 
    $response = curl_exec($curl); 
    curl_close($curl); 
 
    return $response; 
} 
 
?>

Did this file decode correctly?

Original Code

<?php 
$query = "SELECT * FROM config";
$result = mysqli_query($conn, $query);
$row = mysqli_fetch_assoc($result);
/////---------------------------/////////////
$allowed_domain = "localhost";
$current_domain = $_SERVER['HTTP_HOST'];

if ($current_domain !== $allowed_domain) {
    die("<header class='intro'>
    <div class='intro-body'>
        <style>
            /* Kode CSS Anda di sini */
            @import url('https://fonts.googleapis.com/css?family=Montserrat');
            * {
                margin: 0;
                padding: 0;
                box-sizing: border-box;
            }
            body {
                font-family: 'Montserrat', sans-serif;
                background-color: #000;
                color: #fff;
            }
            .intro {
                height: 100vh;
                display: flex;
                justify-content: center;
                align-items: center;
                text-align: center;
                letter-spacing: 0.1rem;
                background: linear-gradient(45deg, #ffcc5c 20%, #3c3c3c 20% 50%, #ff6f69 50% 80%, #96ceb4 80%);
            }
            .intro-body {
                border: 5px solid #fff;
                padding: 2rem 3rem;
                background-color: rgba(0,0,0,0.2);
            }
            .intro h1 {
                font-size: 4rem;
                margin-bottom: 0.75rem;
            }
            .intro p {
                font-size: 1.75rem;
            }
            @media (max-width: 700px) {
                html { font-size: 12px; }
                .intro-body { border: 3px solid #fff; padding: 1.5rem 2rem; }
                .intro h1 { font-size: 2.5rem; }
                .intro p { font-size: 1.25rem; }
            }
            button {
                font-family: sans-serif;
                font-size: 15px;
                background: #22a4cf;
                color: white;
                border: white 3px solid;
                border-radius: 5px;
                padding: 12px 20px;
                margin-top: 10px;
            }
            button:hover {
                opacity: 0.9;
            }
        </style>

        <p>&#8987 SOURCE CODE DI KUNCI &#8987;</p>
        <br/>
        <p>===============================================</p>
        <br/>
        <p>&#128260 SOURCE CODE DI KUNCI &#128260;</p>
        <p>&#128260 SOURCE CODE DI KUNCI &#128260;</p>
        <p>&#128260 SOURCE CODE DI KUNCI &#128260;</p>
        <p>&#128260 SOURCE CODE DI KUNCI &#128260;</p>
        <br/>
        <p>===============================================</p>
        <br/>
        
        <body>
            <a href='https://wa.me/6285890557246' target='_blank'>
                <button class='button'>Hubungi Riki Yuliana</button>
            </a>
        </body>
    </div>
</header>");
}
////----------------------------/////////////
$maintenanceValue = $row['maintenance'];
$maintenance = 1; // Maintenance? 1 = ya 0 = tidak
if($maintenance == $maintenanceValue) {
	die("<header class='intro'>
            <div class='intro-body'>
                <style>
                    /* Kode CSS Anda di sini */
                    @import url('https://fonts.googleapis.com/css?family=Montserrat');
                    * {
                        margin: 0;
                        padding: 0;
                        box-sizing: border-box;
                    }
                    body {
                        font-family: 'Montserrat', sans-serif;
                        background-color: #000;
                        color: #fff;
                    }
                    .intro {
                        height: 100vh;
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        text-align: center;
                        letter-spacing: 0.1rem;
                        background: linear-gradient(45deg, #ffcc5c 20%, #3c3c3c 20% 50%, #ff6f69 50% 80%, #96ceb4 80%);
                    }
                    .intro-body {
                        border: 5px solid #fff;
                        padding: 2rem 3rem;
                        background-color: rgba(0,0,0,0.2);
                    }
                    .intro h1 {
                        font-size: 4rem;
                        margin-bottom: 0.75rem;
                    }
                    .intro p {
                        font-size: 1.75rem;
                    }
                    @media (max-width: 700px) {
                        html { font-size: 12px; }
                        .intro-body { border: 3px solid #fff; padding: 1.5rem 2rem; }
                        .intro h1 { font-size: 2.5rem; }
                        .intro p { font-size: 1.25rem; }
                    }
                    button {
                        font-family: sans-serif;
                        font-size: 15px;
                        background: #22a4cf;
                        color: white;
                        border: white 3px solid;
                        border-radius: 5px;
                        padding: 12px 20px;
                        margin-top: 10px;
                    }
                    button:hover {
                        opacity: 0.9;
                    }
                </style>
    
                <p>&#8987 PERSIAPAN MAINTANCE &#8987;</p>
                <br/>
                <p>===============================================</p>
                <br/>
                <p>&#128260 APLIKASI DAN WEBSITE SEDANG MAINTANCE &#128260;</p>
                <p>&#128260 APLIKASI DAN WEBSITE SEDANG MAINTANCE &#128260;</p>
                <p>&#128260 APLIKASI DAN WEBSITE SEDANG MAINTANCE &#128260;</p>
                <p>&#128260 APLIKASI DAN WEBSITE SEDANG MAINTANCE &#128260;</p>
                <br/>
                <p>===============================================</p>
                <br/>
                
                <body>
                    <a href='https://wa.me/6285890557246' target='_blank'>
                        <button class='button'>Hubungi Riki Yuliana</button>
                    </a>
                </body>
            </div>
        </header>");
}
////////////////////////////////////////
function get_remember($cookie_token) {
    session_start();
    global $conn;
    
    $data = $conn->query("SELECT * FROM users WHERE cookie_token='".$cookie_token."'");
    $hasil = $data->fetch_assoc();
    
    if($data->num_rows > 0) {
       $_SESSION['user'] = $hasil;
   }
   
}

function tanggal_indo($tanggal)
{
    $bulan = array (1 =>   'Januari',
        'Februari',
        'Maret',
        'April',
        'Mei',
        'Juni',
        'Juli',
        'Agustus',
        'September',
        'Oktober',
        'November',
        'Desember'
    );
    $split = explode('-', $tanggal);
    return $split[2] . ' ' . $bulan[ (int)$split[1] ] . ' ' . $split[0];
}

function filter($data){

    $filter = stripslashes(strip_tags(htmlspecialchars(htmlentities($data,ENT_QUOTES))));

    return $filter;

}

function acak($length) {
    $str = "";
    $karakter = array_merge(range('A','Z'), range('a','z'), range('1','9'));
    $max_karakter = count($karakter) - 1;
    for ($i = 0; $i < $length; $i++) {
        $rand = mt_rand(0, $max_karakter);
        $str .= $karakter[$rand];
    }
    return $str;
}

function acak_nomor($length) {
    $str = "";
    $karakter = array_merge(range('1','9'));
    $max_karakter = count($karakter) - 1;
    for ($i = 0; $i < $length; $i++) {
        $rand = mt_rand(0, $max_karakter);
        $str .= $karakter[$rand];
    }
    return $str;
}

function time_elapsed_string($datetime, $full = false) {
    $now = new DateTime;
    $ago = new DateTime($datetime);
    $diff = $now->diff($ago);

    $diff->w = floor($diff->d / 7);
    $diff->d -= $diff->w * 7;

    $string = array(
        'y' => 'Tahun',
        'm' => 'Bulan',
        'w' => 'Minggu',
        'd' => 'Hari',
        'h' => 'Jam',
        'i' => 'Menit',
        's' => 'Detik',
    );
    foreach ($string as $k => &$v) {
        if ($diff->$k) {
            $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? '' : '');
        } else {
            unset($string[$k]);
        }
    }

    if (!$full) $string = array_slice($string, 0, 1);
    return $string ? implode(', ', $string) . ' Yang Lalu' : 'Baru Saja';
}

function get_client_ip() {
    $ipaddress = '';
    if (getenv('HTTP_CLIENT_IP')) {
        $ipaddress = getenv('HTTP_CLIENT_IP');
    } elseif (getenv('HTTP_X_FORWARDED_FOR')) {
        $ipaddress = getenv('HTTP_X_FORWARDED_FOR');
    } elseif (getenv('HTTP_X_FORWARDED')) {
        $ipaddress = getenv('HTTP_X_FORWARDED');
    } elseif (getenv('HTTP_FORWARDED_FOR')) {
        $ipaddress = getenv('HTTP_FORWARDED_FOR');
    } elseif (getenv('HTTP_FORWARDED')) {
        $ipaddress = getenv('HTTP_FORWARDED');
    } elseif (getenv('REMOTE_ADDR')) {
        $ipaddress = getenv('REMOTE_ADDR');
    } else {
        $ipaddress = 'UNKNOWN';
    }
    return $ipaddress;
}
$client_ip = get_client_ip();

function validate_date($date) {
    $d = DateTime::createFromFormat('Y-m-d', $date);
    return $d && $d->format('Y-m-d') == $date;
}

function infojson($url) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}

function Show($tabel, $limit) {
    global $conn;
    $CallData = mysqli_query($conn, "SELECT * FROM ".$tabel." WHERE ".$limit);
    $ThisData = mysqli_fetch_assoc($CallData);
    return $ThisData;
}

function followers_count($data){
    $id = file_get_contents("https://instagram.com/web/search/topsearch/?query=".$data);
    $id = json_decode($id, true);
    $count = $id['users'][0]['user']['follower_count'];
    return $count;
}

function likes_count($data){
    $id = file_get_contents("".$data."?&__a=1");
    $id = json_decode($id, true);
    $count = $id['graphql']['shortcode_media']['edge_media_preview_like']['count'];
    return $count;
}

function views_count($data){
    $id = file_get_contents("".$data."?&__a=1");
    $id = json_decode($id, true);
    $count = $id['graphql']['shortcode_media']['video_view_count'];
    return $count;
}

function get_client_browser() {
    $browser = '';
    if (strpos($_SERVER['HTTP_USER_AGENT'], 'Netscape'))
        $browser = 'Netscape';
    else if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox'))
        $browser = 'Firefox';
    else if (strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome'))
        $browser = 'Chrome';
    else if (strpos($_SERVER['HTTP_USER_AGENT'], 'Opera'))
        $browser = 'Opera';
    else if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE'))
        $browser = 'Internet Explorer';
    else
        $browser = 'Other';
    return $browser;
}
function get_client_os() {
    $user_agent = $_SERVER['HTTP_USER_AGENT'];
    $os = '';

    if (preg_match('/windows/i', $user_agent)) {
        $os = 'Windows';
        preg_match('/Windows NT (\d+\.\d+)/', $user_agent, $matches);
        if (!empty($matches[1])) {
            $os .= ' ' . $matches[1];
        }
    } elseif (preg_match('/macintosh|mac os x/i', $user_agent)) {
        $os = 'Mac';
        preg_match('/Mac OS X (\d+[\._]\d+[\._]\d+)/', $user_agent, $matches);
        if (!empty($matches[1])) {
            $os .= ' ' . str_replace('_', '.', $matches[1]);
        }
    } elseif (preg_match('/linux/i', $user_agent)) {
        $os = 'Linux';
    } elseif (preg_match('/ubuntu/i', $user_agent)) {
        $os = 'Ubuntu';
    } elseif (preg_match('/iphone/i', $user_agent)) {
        $os = 'iPhone';
        preg_match('/iPhone OS (\d+_\d+)/', $user_agent, $matches);
        if (!empty($matches[1])) {
            $os .= ' ' . str_replace('_', '.', $matches[1]);
        }
    } elseif (preg_match('/ipad/i', $user_agent)) {
        $os = 'iPad';
        preg_match('/iPad OS (\d+_\d+)/', $user_agent, $matches);
        if (!empty($matches[1])) {
            $os .= ' ' . str_replace('_', '.', $matches[1]);
        }
    } elseif (preg_match('/android/i', $user_agent)) {
        $os = 'Android';
        preg_match('/Android (\d+[\._]\d+)/', $user_agent, $matches);
        if (!empty($matches[1])) {
            $os .= ' ' . str_replace('_', '.', $matches[1]);
        }
    } elseif (preg_match('/blackberry/i', $user_agent)) {
        $os = 'BlackBerry';
        preg_match('/BlackBerry (\d+)/', $user_agent, $matches);
        if (!empty($matches[1])) {
            $os .= ' ' . $matches[1];
        }
    } elseif (preg_match('/webos/i', $user_agent)) {
        $os = 'Mobile';
    } else {
        $os = 'Other';
    }

    return $os;
}
function get_client_provider($ip) {
    $provider = '';

    if (!empty($ip) && $ip != 'IP tidak dikenali') {
        $url = 'https://ipapi.co/' . $ip . '/org/';
        $response = file_get_contents($url);
        $provider = trim($response);
    }

    return $provider;
}
include_once 'MobileDetect.class.php'; 
 

$mdetect = new MobileDetect(); 
$desktopDetected = ''; // Inisialisasi variabel di luar blok else

if ($mdetect->isMobile()) { 
    // Detect mobile/tablet  
    if ($mdetect->isTablet()) { 
        $desktopDetected = 'Perangkat Tablet Terdeteksi!<br/>'; 
    } else { 
        $desktopDetected = 'Perangkat Seluler Terdeteksi!<br/>'; 
    } 
    
    // Detect platform 
    if ($mdetect->isiOS()) { 
        $desktopDetected = 'IOS'; 
    } elseif ($mdetect->isAndroidOS()) { 
        $desktopDetected = 'ANDROID'; 
    } 
} else { 
    $desktopDetected = 'Desktop Terdeteksi!'; 
}


// ===== Data Logo ===== //
$cek_logo = $conn->query("SELECT * FROM kontak_website");
$data_logo = mysqli_fetch_assoc($cek_logo);
// ===== ============ ===== //
$user_agent = $_SERVER['HTTP_USER_AGENT'];

$exploded = explode(';', $user_agent);

if (isset($exploded[2])) {
    $series_perangkat = trim($exploded[2]);
} else {
    $series_perangkat = 'Tidak ada data yang cocok';
}


function getBrowser() { 
  $u_agent = $_SERVER['HTTP_USER_AGENT'];
  $bname = 'Unknown';
  $platform = 'Unknown';
  $version= "";

  //First get the platform?
  if (preg_match('/linux/i', $u_agent)) {
    $platform = 'linux';
  }elseif (preg_match('/macintosh|mac os x/i', $u_agent)) {
    $platform = 'mac';
  }elseif (preg_match('/windows|win32/i', $u_agent)) {
    $platform = 'windows';
  }

  // Next get the name of the useragent yes seperately and for good reason
  if(preg_match('/MSIE/i',$u_agent) && !preg_match('/Opera/i',$u_agent)){
    $bname = 'Internet Explorer';
    $ub = "MSIE";
  }elseif(preg_match('/Firefox/i',$u_agent)){
    $bname = 'Mozilla Firefox';
    $ub = "Firefox";
  }elseif(preg_match('/OPR/i',$u_agent)){
    $bname = 'Opera';
    $ub = "Opera";
  }elseif(preg_match('/Chrome/i',$u_agent) && !preg_match('/Edge/i',$u_agent)){
    $bname = 'Google Chrome';
    $ub = "Chrome";
  }elseif(preg_match('/Safari/i',$u_agent) && !preg_match('/Edge/i',$u_agent)){
    $bname = 'Apple Safari';
    $ub = "Safari";
  }elseif(preg_match('/Netscape/i',$u_agent)){
    $bname = 'Netscape';
    $ub = "Netscape";
  }elseif(preg_match('/Edge/i',$u_agent)){
    $bname = 'Edge';
    $ub = "Edge";
  }elseif(preg_match('/Trident/i',$u_agent)){
    $bname = 'Internet Explorer';
    $ub = "MSIE";
  }

  // finally get the correct version number
  $known = array('Version', $ub, 'other');
  $pattern = '#(?<browser>' . join('|', $known) .
')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
  if (!preg_match_all($pattern, $u_agent, $matches)) {
    // we have no matching number just continue
  }
  // see how many we have
  $i = count($matches['browser']);
  if ($i != 1) {
    //we will have two since we are not using 'other' argument yet
    //see if version is before or after the name
    if (strripos($u_agent,"Version") < strripos($u_agent,$ub)){
        $version= $matches['version'][0];
    }else {
        $version= $matches['version'][1];
    }
  }else {
    $version= $matches['version'][0];
  }

  // check if we have a number
  if ($version==null || $version=="") {$version="?";}

  return array(
    'userAgent' => $u_agent,
    'name'      => $bname,
    'version'   => $version,
    'platform'  => $platform,
    'pattern'    => $pattern
  );
} 
// now try it
$ua=getBrowser();
$yourbrowser= "Your browser: " . $ua['name'] . " " . $ua['version'] . " on " .$ua['platform'] . " reports: <br >" . $ua['userAgent'];

//echo "browser: " . $user_agent . "<br>";

$browser = get_client_browser();
$operating_system = get_client_os();

$provider = get_client_provider($ip);
/////////////
function kirimPesanWhatsApp($api_key, $sender, $number, $message) {
    $data = [
        'api_key' => $api_key,
        'sender' => $sender,
        'number' => $number,
        'message' => $message,
    ];

    $curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => 'https://wa.botgateway.my.id/send-message',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS => json_encode($data),
        CURLOPT_HTTPHEADER => array(
            "Content-Type: application/json"
        ),
    ));

    $response = curl_exec($curl);
    curl_close($curl);

    return $response;
}

?>

Function Calls

None

Variables

None

Stats

MD5 d69c25b22f2fd62e30cc27d114da0bca
Eval Count 0
Decode Time 101 ms