Worpdress siteler için kendi siteleri veya belirtilen domainler dışında link çıkışı yapılan içerikleri tespit etmeniz için "Nofollow for external link" eklentisi üzerinde işlem yaparken list çıkarmaya bir script ayarladım. İhtiyaç duyan kullanabilir.
<?php
header('Content-Type: text/html; charset=utf-8');
$db_host = "localhost";
$db_user = "Db Kullanıcı";
$db_pwd = "DB Kullanıcı Şifre";
$db_name = "DB Adı";
function link_bul( $content ) {
$regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>";
if(preg_match_all("/$regexp/siU", $content, $matches, PREG_SET_ORDER)) {
if( !empty($matches) ) {
$ownDomain = 'siteadresi.com';
$exclude_domains_list = array('blogger.com','blogspot.com','siteadresi.com','siteadresi.com');
for ($i=0; $i < count($matches); $i++)
{
$tag = $matches[$i][0];
$tag2 = $matches[$i][0];
$url = $matches[$i][0];
$res = preg_match('/href(\s)*=(\s)*"[#|\/]*[a-zA-Z0-9-_\/]+"/',$url);
if($res) {
continue;
}
$pos = strpos($url,$ownDomain);
if ($pos === false) {
$domainCheckFlag = true;
if(count($exclude_domains_list)>0) {
$exclude_domains_list = array_filter($exclude_domains_list);
foreach($exclude_domains_list as $domain) {
$domain = trim($domain);
if($domain!='') {
$domainCheck = strpos($url,$domain);
if($domainCheck === false) {
continue;
} else {
$domainCheckFlag = false;
break;
}
}
}
}
if($domainCheckFlag) {
return TRUE;
}
}
}
}
}
return FALSE;
}
if ( ! $link_id = @mysql_connect ($db_host,$db_user,$db_pwd) )
{
echo "Veritabanına bağlanılamadı";
exit;
}
else if ( ! @mysql_select_db ($db_name,$link_id) )
{
echo "Veritabanı seçilemedi";
exit;
}
$link = mysql_query ("select * from `wp_posts` where post_content REGEXP '<a' and post_status = 'publish'");
while ( $row = mysql_fetch_assoc ($link) )
{
if(link_bul($row['post_content'])){
echo $row['post_name']."<br>";
}
}
--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 02:12:35 -->-> Daha önceki mesaj 02:10:17 --
kopya içerik cezası gelmemiş söylediğinize göre, yapay baglantı cezası gelmiş, o yüzden o içerikleri kaldırdıgınızda çözülmesi lazım.
yine de kabul etmezlerse son çare 301 kalır ama bu aralar sıkıntılı oldugu söyleniyo, son güncellemeden sonra test etmedim.
evet o mantıklı geliyor wordpress eklentisi ile nofollow yaptığım tüm çıkışları sanırsam, google reindex yaptırmak gerekiyor. Bunda kendiliğinde olması bir anda zor görünüyor. Bir liste çıkardım bunun üzerinden pingleme,fetch as google bot ile bu sayfalarında tekrar index almasını sağlamaya çalışıcam.