Webmaster ve Yazılım Geliştiriciler
Amp Sayfaları Farklı Domainde Gösterme Bypass
Amp Sayfaları Farklı Domainde Gösterme Bypass
-
Wordpresss plugins klasörüne atıp çalıştırıyoruz $addon = 'www.site.com' kendi sitenize göre değiştiryorsunuz yazılımın orjinalinde libxml_use_internal_errors(true); hataları sürekli errolog basar o düzeltildi
<?php
/**
*
* Plugin Name: Change AMPHTML
* Description: AMP sayfaları için amphtml etiketi domainini değiştirir. Ücretsiz bir yazılımdır. Güncel sürümünü github sayfamdan edinebilirsiniz.
* Version: 1.9
* Author: Emre Nogay
* Plugin URI: https://github.com/emrenogay/change-amphtml
* Author URI: https://emrenogay.com
* License: GNU General Public License v3.0
*
*/
function buffer_bunny($finder)
{
if (strpos($finder, 'https://cdn.ampproject.org/') !== false && !is_admin())
{
$pure_domain = str_replace(['https://', 'http://'], null, get_site_url());
$prefix = is_ssl() ? 'https://' : 'http://';
$dom = new DOMDocument();
libxml_use_internal_errors(true); // Hataları görmezden gel
$dom->loadHTML($finder, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
libxml_use_internal_errors(false); // Hataları geri aç
// Kod buraya kadar
$xpath = new DOMXPath($dom);
$elements = $xpath->query('//amp-img | //img | //amp-anim');
foreach ($elements as $element)
{
if ($element->hasAttribute('src'))
{
$src = $element->getAttribute('src');
if (strstr($src, $_SERVER['HTTP_HOST']))
{
$new_src = preg_replace('/https?:\/\/.*?\//', $prefix . 'i0.wp.com/' . $pure_domain . '/', $src);
$element->setAttribute('src', $new_src);
}
}
if ($element->hasAttribute('srcset'))
{
$srcset = $element->getAttribute('srcset');
if (strstr($srcset, $_SERVER['HTTP_HOST']))
{
$new_srcset = preg_replace('/https?:\/\/.*?\//', $prefix . 'i0.wp.com/' . $pure_domain . '/', $srcset);
$element->setAttribute('srcset', $new_srcset);
}
}
}
$finder = $dom->saveHTML();
}
$http_version = is_ssl() ? 'https://' : 'http://';
$addon = 'www.site.com'; // $addon'ı 'var.com' olarak ayarlıyoruz
$finder = str_replace('<link rel="amphtml" href="' . get_site_url() , '<link rel="amphtml" href="' . $http_version . $addon, $finder);
$finder = str_replace("<link rel='amphtml' href='" . get_site_url() , "<link rel='amphtml' href='" . $http_version . $addon, $finder);
return $finder;
}
function buffer_bunny_start()
{
if (function_exists('buffer_bunny'))
{
ob_start('buffer_bunny');
}
}
function buffer_bunny_end()
{
if (function_exists('buffer_bunny') && ob_start('buffer_bunny') === true)
{
ob_end_flush();
}
}
add_action('after_setup_theme', 'buffer_bunny_start');
add_action('shutdown', 'buffer_bunny_end');
add_filter('plugin_action_links_change-amphtml-main/change-amphtml.php', function ($links_array)
{
array_unshift($links_array, '<a href="' . get_admin_url() . 'options-general.php?page=emrenogay_amphtml_group">Ayarlar</a>');
return $links_array;
});
add_action('admin_init', function ()
{
register_setting('emrenogay_amphtml_group', 'emrenogay__amphtml');
});
add_action('admin_menu', function ()
{
add_options_page('AMPHTML', 'AMPHTML', 'manage_options', 'emrenogay_amphtml_group', function ()
{
?>
<style>
.submit{
padding: 0;
}
p.submit{
margin-top: 0 !important;
}
</style>
<div style="width: fit-content; background: white; padding:15px; margin:10% auto 0; border-radius:7px;box-shadow: 1px 0 25px rgba(0, 0, 0, .1)">
<div>
<form method="post" action="options.php">
<?php settings_fields('emrenogay_amphtml_group'); ?>
<?php do_settings_sections('emrenogay_amphtml_group'); ?>
<label>
<div style="margin-bottom:10px">
Kutuya <strong>sadece domain</strong> yazın. <br> Örneğin: sub.domain.com veya emrenogay.com gibi.
</div>
<input type="text" name="emrenogay__amphtml" placeholder="AMPHTML içeriği" value="<?php echo get_option('emrenogay__amphtml') ?>">
</label>
<?php submit_button(); ?>
<p>Bu eklenti <a href="https://emrenogay.com" rel="nofollow" target="_blank">emrenogay.com</a> tarafından <strong>ücretsiz</strong> promosyon olarak verilmektedir.</p>
</form>
</div>
</div>
<?php
});
});bu dosyayı taşıycagınız domain dizinine eklemelisiniz.
index.php
<?php
$url = 'https://www.eskisite.com' . $_SERVER['REQUEST_URI'];
$replace = array(
'<a href="https://www.eskisite.com/' => '<a href="https://www-yenisite-com.cdn.ampproject.org/c/s/www.yensite.com/',
'oldword' => 'newword',
'oldtext' => 'newtext'
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
foreach ($replace as $old_word => $new_word) {
$response = str_replace($old_word, $new_word, $response);
}
echo $response;
?>.htaccess dosyası
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>bu şekilde amp farklı domainde extra bir script kullanmadan kullana bilirsiniz.
-
Amp domainize sadece google bot girmesi için .htaccess dosyanıza ekleye bilirsin sitenize l4 l7 saldırısı alırsanızda kod işinizi görücektir siteniz diğer kullanıcılara kapansa bile google gezebilir.
Order deny,allow
Deny from all
Allow from 2001:4860:4801:10::/64
Allow from 2001:4860:4801:11::/64
Allow from 2001:4860:4801:12::/64
Allow from 2001:4860:4801:13::/64
Allow from 2001:4860:4801:14::/64
Allow from 2001:4860:4801:15::/64
Allow from 2001:4860:4801:16::/64
Allow from 2001:4860:4801:17::/64
Allow from 2001:4860:4801:18::/64
Allow from 2001:4860:4801:19::/64
Allow from 2001:4860:4801:1a::/64
Allow from 2001:4860:4801:1b::/64
Allow from 2001:4860:4801:1c::/64
Allow from 2001:4860:4801:1d::/64
Allow from 2001:4860:4801:1e::/64
Allow from 2001:4860:4801:20::/64
Allow from 2001:4860:4801:21::/64
Allow from 2001:4860:4801:22::/64
Allow from 2001:4860:4801:23::/64
Allow from 2001:4860:4801:24::/64
Allow from 2001:4860:4801:25::/64
Allow from 2001:4860:4801:26::/64
Allow from 2001:4860:4801:27::/64
Allow from 2001:4860:4801:28::/64
Allow from 2001:4860:4801:29::/64
Allow from 2001:4860:4801:2::/64
Allow from 2001:4860:4801:2a::/64
Allow from 2001:4860:4801:2b::/64
Allow from 2001:4860:4801:2c::/64
Allow from 2001:4860:4801:2d::/64
Allow from 2001:4860:4801:2e::/64
Allow from 2001:4860:4801:2f::/64
Allow from 2001:4860:4801:30::/64
Allow from 2001:4860:4801:31::/64
Allow from 2001:4860:4801:32::/64
Allow from 2001:4860:4801:33::/64
Allow from 2001:4860:4801:34::/64
Allow from 2001:4860:4801:35::/64
Allow from 2001:4860:4801:36::/64
Allow from 2001:4860:4801:37::/64
Allow from 2001:4860:4801:38::/64
Allow from 2001:4860:4801:39::/64
Allow from 2001:4860:4801:3::/64
Allow from 2001:4860:4801:3a::/64
Allow from 2001:4860:4801:3b::/64
Allow from 2001:4860:4801:3c::/64
Allow from 2001:4860:4801:3d::/64
Allow from 2001:4860:4801:3e::/64
Allow from 2001:4860:4801:40::/64
Allow from 2001:4860:4801:41::/64
Allow from 2001:4860:4801:42::/64
Allow from 2001:4860:4801:43::/64
Allow from 2001:4860:4801:44::/64
Allow from 2001:4860:4801:45::/64
Allow from 2001:4860:4801:46::/64
Allow from 2001:4860:4801:47::/64
Allow from 2001:4860:4801:48::/64
Allow from 2001:4860:4801:49::/64
Allow from 2001:4860:4801:4a::/64
Allow from 2001:4860:4801:50::/64
Allow from 2001:4860:4801:51::/64
Allow from 2001:4860:4801:53::/64
Allow from 2001:4860:4801:54::/64
Allow from 2001:4860:4801:55::/64
Allow from 2001:4860:4801:60::/64
Allow from 2001:4860:4801:61::/64
Allow from 2001:4860:4801:62::/64
Allow from 2001:4860:4801:63::/64
Allow from 2001:4860:4801:64::/64
Allow from 2001:4860:4801:65::/64
Allow from 2001:4860:4801:66::/64
Allow from 2001:4860:4801:67::/64
Allow from 2001:4860:4801:68::/64
Allow from 2001:4860:4801:69::/64
Allow from 2001:4860:4801:6a::/64
Allow from 2001:4860:4801:6b::/64
Allow from 2001:4860:4801:6c::/64
Allow from 2001:4860:4801:6d::/64
Allow from 2001:4860:4801:6e::/64
Allow from 2001:4860:4801:6f::/64
Allow from 2001:4860:4801:70::/64
Allow from 2001:4860:4801:71::/64
Allow from 2001:4860:4801:72::/64
Allow from 2001:4860:4801:73::/64
Allow from 2001:4860:4801:74::/64
Allow from 2001:4860:4801:75::/64
Allow from 2001:4860:4801:76::/64
Allow from 2001:4860:4801:77::/64
Allow from 2001:4860:4801:78::/64
Allow from 2001:4860:4801:80::/64
Allow from 2001:4860:4801:81::/64
Allow from 2001:4860:4801:82::/64
Allow from 2001:4860:4801:83::/64
Allow from 2001:4860:4801:84::/64
Allow from 2001:4860:4801:85::/64
Allow from 2001:4860:4801:86::/64
Allow from 2001:4860:4801:87::/64
Allow from 2001:4860:4801:88::/64
Allow from 2001:4860:4801:90::/64
Allow from 2001:4860:4801:91::/64
Allow from 2001:4860:4801:92::/64
Allow from 2001:4860:4801:93::/64
Allow from 2001:4860:4801::/64
Allow from 2001:4860:4801:c::/64
Allow from 2001:4860:4801:f::/64
Allow from 192.178.5.0/27
Allow from 34.100.182.96/28
Allow from 34.101.50.144/28
Allow from 34.118.254.0/28
Allow from 34.118.66.0/28
Allow from 34.126.178.96/28
Allow from 34.146.150.144/28
Allow from 34.147.110.144/28
Allow from 34.151.74.144/28
Allow from 34.152.50.64/28
Allow from 34.154.114.144/28
Allow from 34.155.98.32/28
Allow from 34.165.18.176/28
Allow from 34.175.160.64/28
Allow from 34.176.130.16/28
Allow from 34.22.85.0/27
Allow from 34.64.82.64/28
Allow from 34.65.242.112/28
Allow from 34.80.50.80/28
Allow from 34.88.194.0/28
Allow from 34.89.10.80/28
Allow from 34.89.198.80/28
Allow from 34.96.162.48/28
Allow from 35.247.243.240/28
Allow from 66.249.64.0/27
Allow from 66.249.64.128/27
Allow from 66.249.64.160/27
Allow from 66.249.64.192/27
Allow from 66.249.64.224/27
Allow from 66.249.64.32/27
Allow from 66.249.64.64/27
Allow from 66.249.64.96/27
Allow from 66.249.65.0/27
Allow from 66.249.65.128/27
Allow from 66.249.65.160/27
Allow from 66.249.65.192/27
Allow from 66.249.65.224/27
Allow from 66.249.65.32/27
Allow from 66.249.65.64/27
Allow from 66.249.65.96/27
Allow from 66.249.66.0/27
Allow from 66.249.66.128/27
Allow from 66.249.66.160/27
Allow from 66.249.66.192/27
Allow from 66.249.66.32/27
Allow from 66.249.66.64/27
Allow from 66.249.66.96/27
Allow from 66.249.68.0/27
Allow from 66.249.68.32/27
Allow from 66.249.68.64/27
Allow from 66.249.69.0/27
Allow from 66.249.69.128/27
Allow from 66.249.69.160/27
Allow from 66.249.69.192/27
Allow from 66.249.69.224/27
Allow from 66.249.69.32/27
Allow from 66.249.69.64/27
Allow from 66.249.69.96/27
Allow from 66.249.70.0/27
Allow from 66.249.70.128/27
Allow from 66.249.70.160/27
Allow from 66.249.70.192/27
Allow from 66.249.70.224/27
Allow from 66.249.70.32/27
Allow from 66.249.70.64/27
Allow from 66.249.70.96/27
Allow from 66.249.71.0/27
Allow from 66.249.71.128/27
Allow from 66.249.71.160/27
Allow from 66.249.71.192/27
Allow from 66.249.71.224/27
Allow from 66.249.71.32/27
Allow from 66.249.71.64/27
Allow from 66.249.71.96/27
Allow from 66.249.72.0/27
Allow from 66.249.72.128/27
Allow from 66.249.72.160/27
Allow from 66.249.72.192/27
Allow from 66.249.72.224/27
Allow from 66.249.72.32/27
Allow from 66.249.72.64/27
Allow from 66.249.72.96/27
Allow from 66.249.73.0/27
Allow from 66.249.73.128/27
Allow from 66.249.73.160/27
Allow from 66.249.73.192/27
Allow from 66.249.73.224/27
Allow from 66.249.73.32/27
Allow from 66.249.73.64/27
Allow from 66.249.73.96/27
Allow from 66.249.74.0/27
Allow from 66.249.74.128/27
Allow from 66.249.74.32/27
Allow from 66.249.74.64/27
Allow from 66.249.74.96/27
Allow from 66.249.75.0/27
Allow from 66.249.75.128/27
Allow from 66.249.75.160/27
Allow from 66.249.75.192/27
Allow from 66.249.75.224/27
Allow from 66.249.75.32/27
Allow from 66.249.75.64/27
Allow from 66.249.75.96/27
Allow from 66.249.76.0/27
Allow from 66.249.76.128/27
Allow from 66.249.76.160/27
Allow from 66.249.76.192/27
Allow from 66.249.76.224/27
Allow from 66.249.76.32/27
Allow from 66.249.76.64/27
Allow from 66.249.76.96/27
Allow from 66.249.77.0/27
Allow from 66.249.77.128/27
Allow from 66.249.77.160/27
Allow from 66.249.77.192/27
Allow from 66.249.77.224/27
Allow from 66.249.77.32/27
Allow from 66.249.77.64/27
Allow from 66.249.77.96/27
Allow from 66.249.78.0/27
Allow from 66.249.79.0/27
Allow from 66.249.79.128/27
Allow from 66.249.79.160/27
Allow from 66.249.79.192/27
Allow from 66.249.79.224/27
Allow from 66.249.79.32/27
Allow from 66.249.79.64/27
Allow from 66.249.79.96/27
Allow from 74.125.208.35/27
Allow from 66.102.9.77/27
Allow from 66.249.84.226/27
Allow from 74.125.208.36/27
Allow from 74.125.0.0/16
Allow from 66.102.9.0/25
Allow from 66.102.0.0/20
Allow from 66.102.8.0/23
Allow from 66.249.0.0/20
Allow from 8.8.4.0/24
Allow from 8.8.8.0/24
Allow from 8.34.208.0/20
Allow from 8.35.192.0/20
Allow from 23.236.48.0/20
Allow from 23.251.128.0/19
Allow from 34.0.0.0/15
Allow from 34.2.0.0/16
Allow from 34.3.0.0/23
Allow from 34.3.3.0/24
Allow from 34.3.4.0/24
Allow from 34.3.8.0/21
Allow from 34.3.16.0/20
Allow from 34.3.32.0/19
Allow from 34.3.64.0/18
Allow from 34.3.128.0/17
Allow from 34.4.0.0/14
Allow from 34.8.0.0/13
Allow from 34.16.0.0/12
Allow from 34.32.0.0/11
Allow from 34.64.0.0/10
Allow from 34.128.0.0/10
Allow from 35.184.0.0/13
Allow from 35.192.0.0/14
Allow from 35.196.0.0/15
Allow from 35.198.0.0/16
Allow from 35.199.0.0/17
Allow from 35.199.128.0/18
Allow from 35.200.0.0/13
Allow from 35.208.0.0/12
Allow from 35.224.0.0/12
Allow from 35.240.0.0/13
Allow from 64.15.112.0/20
Allow from 64.233.160.0/19
Allow from 66.22.228.0/23
Allow from 66.102.0.0/20
Allow from 66.249.64.0/19
Allow from 70.32.128.0/19
Allow from 72.14.192.0/18
Allow from 74.125.0.0/16
Allow from 104.154.0.0/15
Allow from 104.196.0.0/14
Allow from 104.237.160.0/19
Allow from 107.167.160.0/19
Allow from 107.178.192.0/18
Allow from 108.59.80.0/20
Allow from 108.170.192.0/18
Allow from 108.177.0.0/17
Allow from 130.211.0.0/16
Allow from 142.250.0.0/15
Allow from 146.148.0.0/17
Allow from 162.216.148.0/22
Allow from 162.222.176.0/21
Allow from 172.110.32.0/21
Allow from 172.217.0.0/16
Allow from 172.253.0.0/16
Allow from 173.194.0.0/16
Allow from 173.255.112.0/20
Allow from 192.158.28.0/22
Allow from 192.178.0.0/15
Allow from 193.186.4.0/24
Allow from 199.36.154.0/23
Allow from 199.36.156.0/24
Allow from 199.192.112.0/22
Allow from 199.223.232.0/21
Allow from 207.223.160.0/20
Allow from 208.65.152.0/22
Allow from 208.68.108.0/22
Allow from 208.81.188.0/22
Allow from 208.117.224.0/19
Allow from 209.85.128.0/17
Allow from 216.58.192.0/19
Allow from 216.73.80.0/20
Allow from 216.239.32.0/19
Allow from 2001:4860::/32
Allow from 2404:6800::/32
Allow from 2404:f340::/32
Allow from 2600:1900::/28
Allow from 2606:73c0::/32
Allow from 2607:f8b0::/32
Allow from 2620:11a:a000::/40
Allow from 2620:120:e000::/40
Allow from 2800:3f0::/32
Allow from 2a00:1450::/32
Allow from 2c0f:fb50::/32 -
sen bu günlerde esc ilan sitesimi açıyorsun ne yapıyorsun onların alemetine benziyor :-)
-
kUz3y bunu yazdı
sen bu günlerde esc ilan sitesimi açıyorsun ne yapıyorsun onların alemetine benziyor :-)
yok bu dosyaları normal sitesi olanda kullanilir adam mesela ads sayfa yapıp cloaker şeklinde kullabilir ben fikir babında paylaşıyorum. :)
-
güncel google iplerini
https://www.gstatic.com/ipranges/goog.json
buradan sürekli kontrol edebilirsin unutmayın google ip blogu bizim ülkemizin toplam ip blogundan çok fazla
-
Şöyle yapılır mı yada nasıl spam siteler sadece içeriği Google gösteriyor normal kullanıcı ise direk reklam a yönlendiriyor
-
nereodi bunu yazdı
Şöyle yapılır mı yada nasıl spam siteler sadece içeriği Google gösteriyor normal kullanıcı ise direk reklam a yönlendiriyor
onu useragent kullanarak yapıyorlar kodu paylaşayım
function isBots()
{
$botAgents ="/ltx71|google/i";
$agent = $_SERVER['HTTP_USER_AGENT'];
if (preg_match($botAgents,$agent))
return true;
else
return false;
}
if (isBots())
{
echo @(' googele görüceği');
}
else
{
echo @(' normal kullanıcının görüceği kod');
} -
EcHoLL bunu yazdınereodi bunu yazdı
Şöyle yapılır mı yada nasıl spam siteler sadece içeriği Google gösteriyor normal kullanıcı ise direk reklam a yönlendiriyor
onu useragent kullanarak yapıyorlar kodu paylaşayım
function isBots()
{
$botAgents ="/ltx71|google/i";
$agent = $_SERVER['HTTP_USER_AGENT'];
if (preg_match($botAgents,$agent))
return true;
else
return false;
}
if (isBots())
{
echo @(' googele görüceği');
}
else
{
echo @(' normal kullanıcının görüceği kod');
}Eyvallah hacı abi teşekkürler
-
P*no, bet aff sitesi falan yapılıyor galiba :D bize de ekmek çıkar mı ya :D