<?php
// Seo Class Code By Kerim Yılmaz
class seo{
public $tr1;
public function sef($tr1) {
$tr1 = trim($tr1);
$tr1 = str_replace("--","",$tr1);
$tr1 = str_replace("---","",$tr1);
$turkce=array("ş","Ş","ı","(",")","‘","ü","Ü","ö","Ö","ç","Ç"," ","/","*","?",
"ş","Ş","ı","ğ","Ğ","İ","ö","Ö","Ç","ç","ü","Ü","-","A","B","C","D","E","F","G",
"H","I","J","K","L","M","N","O","P","R","S","T","U","V","Y","Z","Q","X","W");
$duzgun=array("s","s","i","","","","u","u","o","o","c","c","-","-","-","","s",
"s","i","g","g","I","o","o","c","c","u","u","+","a","b","c","d","e","f","g","h",
"i","j","k","l","m","n","o","p","r","s","t","u","v","y","z","q","x","w");
$tr1=str_replace($turkce,$duzgun,$tr1);
$tr1 = preg_replace("@[^A-Za-z0-9\+_]+@i","",$tr1);
$tr1 = str_replace("--","-",$tr1);
$tr1 = str_replace("---","-",$tr1);
$tr1 = str_replace("--","-",$tr1);
$tr1 = str_replace("+","-",$tr1);
return $tr1;
}
}
$seo = new seo();
?>
Kullanımı :
$seourl = $seo->sef($konusbasligi);
Hiç yorum yok:
Yorum Gönder