API ile bağlantı hatası: ' . esc_html($connect_api->get_error_message()) . '';
} else {
$api_response = json_decode(wp_kses_post($connect_api['body']), true);
if (isset($_POST['TYPE']) && $_POST['TYPE'] === 'LoginNotificationsetting') {
if (!isset($_POST['LoginNotificationsettings']) || !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['LoginNotificationsettings'])), 'LoginNotificationsettings')) {
echo '
Üzgünüz, bu sayfaya erişim yetkiniz yok!
';
exit;
} else {
$lgntfy_phone = sanitize_text_field(wp_unslash($_POST['lgntfy_phone']));
update_option('lgntfy_phone', $lgntfy_phone);
$lgntfy_apikey = sanitize_text_field(wp_unslash($_POST['lgntfy_apikey']));
update_option('lgntfy_apikey', $lgntfy_apikey);
echo 'Ayarlarınız Güncellendi!
';
}
}
}
$lgntfy_phone = get_option("lgntfy_phone");
$lgntfy_apikey = get_option("lgntfy_apikey");
if (empty($lgntfy_apikey)) {
echo 'Lütfen ayarları yapın!
';
} else {
$Burl = "https://wapiwp.com/api/loginpush/?apikey=" . $lgntfy_apikey;
$Credit = wp_remote_post($Burl, array(
'method' => 'POST',
'timeout' => 45,
'redirection' => 5,
'httpversion' => '1.0',
'blocking' => true,
'headers' => array(),
'body' => array(
'credit' => true
),
'cookies' => array()
));
if (!is_wp_error($Credit)) {
$Credit = json_decode($Credit["body"]);
if (isset($Credit->status) && $Credit->status == "success" && isset($Credit->credit)) {
$NowCredit = wp_kses($Credit->credit, array());
} else {
$NowCredit = "0";
echo 'API beklenmeyen bir yanıt döndürdü.
';
}
} else {
echo 'API ile iletişim hatası: ' . esc_html($Credit->get_error_message()) . '
';
}
}
?>
AdSignalPro