Mini Shell
<?php
//Veri Tabanına Bağlantı
$baglan=mysqli_connect("localhost","ecoikhhp_haierklima","Haier.klima00","ecoikhhp_haierklima");
mysqli_set_charset($baglan, "utf8");
try {
$db = new PDO("mysql:host=localhost;dbname=ecoikhhp_haierklima;charset=utf8", 'ecoikhhp_haierklima', 'Haier.klima00');
} catch (PDOExceptition $e) {
echo $e->getMessage();
}
$meta = $db->query('SELECT * FROM site_seo')->fetch();
$title = $meta['title'];
$description = $meta['description'];
$keywords = $meta['keywords'];
$favicon = $meta['favicon'];
$logo = $meta['logo'];
function seo($s) {
$tr = array('ş','Ş','ı','I','İ','ğ','Ğ','ü','Ü','ö','Ö','Ç','ç','(',')','/',':',',');
$eng = array('s','s','i','i','i','g','g','u','u','o','o','c','c','','','-','-','');
$s = str_replace($tr,$eng,$s);
$s = strtolower($s);
$s = preg_replace('/&amp;amp;amp;amp;amp;amp;amp;amp;.+?;/', '', $s);
$s = preg_replace('/\s+/', '-', $s);
$s = preg_replace('|-+|', '-', $s);
$s = preg_replace('/#/', '', $s);
$s = str_replace('.', '', $s);
$s = trim($s, '-');
return $s;
}
function HtmlTemizle ($text) {
$text = preg_replace("'<script[^>]*>.*?</script>'si", '', $text );
$text = preg_replace("'<p[^>]*>.*?</p>'si", '', $text );
$text = preg_replace('/<a\s+.*?href="([^"]+)"[^>]*>([^<]+)<\/a>/is', '\2 (\1)',$text );
$text = preg_replace( '/<!--.+?-->/', '', $text );
$text = preg_replace( '/{.+?}/', '', $text );
$text = preg_replace( '/ /', ' ', $text );
$text = preg_replace( '/&/', ' ', $text );
$text = preg_replace( '/"/', ' ', $text );
$text = strip_tags($text);
$text = htmlspecialchars($text);
return $text;
}
?>