"error", "message" => "Email veya şifre eksik." ]); exit; } $login_url = "https://www.ezglobalyazilim.com/ajax.php"; $login_data = [ "s1" => "uyelik", "s2" => "islem", "islem" => "gir", "refuser" => "0", "eposta" => $email, "sifre" => $pass, "ajtip" => "eval" ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $login_url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($login_data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Content-Type: application/x-www-form-urlencoded", "Referer: https://www.ezglobalyazilim.com/uyelik.html" ]); curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt"); $login_response = curl_exec($ch); if (strpos($login_response, "Formda eksik veri bulunmaktadır.") !== false) { echo json_encode([ "status" => "fail", "message" => "Giriş başarısız: Eksik veri" ]); exit; } $profile_url = "https://www.ezglobalyazilim.com/hesabim/profil.html"; curl_setopt($ch, CURLOPT_URL, $profile_url); curl_setopt($ch, CURLOPT_POST, false); $profile_html = curl_exec($ch); function parse_value($html, $id) { if (preg_match('/([^<]*)<\/div>/', $program_html, $matches)) { $kullanim_suresi = trim($matches[1]); } curl_close($ch); echo json_encode([ "status" => "success", "isim" => $isim, "soyisim" => $soyisim, "adres" => $adres, "telefon" => $telefon, "mail" => $mail, "kullanim_suresi" => $kullanim_suresi ]); ?>