$username, 'password' => $password, 'login' => 'Login' ])); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_COOKIEJAR, __DIR__ . '/observium_cookie.txt'); // simpan cookie curl_setopt($ch, CURLOPT_COOKIEFILE, __DIR__ . '/observium_cookie.txt'); curl_setopt($ch, CURLOPT_HEADER, false); // Jalankan login $response = curl_exec($ch); if (curl_errno($ch)) { die('Login error: ' . curl_error($ch)); } // Redirect user ke halaman dashboard Observium curl_close($ch); header('Location: ' . $observium_host . '/'); // ganti path kalau mau ke halaman tertentu exit(); ?>