$username, 'password' => $password ])); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_COOKIEJAR, __DIR__ . '/genieacs_cookie.txt'); // simpan cookie curl_setopt($ch, CURLOPT_COOKIEFILE, __DIR__ . '/genieacs_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 target dengan session cookie curl_close($ch); // Gunakan header untuk redirect header('Location: ' . $genieacs_host . $target_path); exit(); ?>