@header('Content-Type: text/html; charset=utf-8');
ini_set('memory_limit', '1024M');
ini_set('max_execution_time', '0');
date_default_timezone_set('Europe/Istanbul');
$host = "localhost";
$hostadi = "celik_usr";
$hostsifre = "CElik**2022";
$hostdb = "celikdb";
$baglanti = mysql_connect($host,$hostadi,$hostsifre);
if(!$baglanti) die ("MySQL'e bağlanılamadı.");
mysql_select_db($hostdb,$baglanti) or die ("Database'e bağlanılamadı.");
mysql_query("SET NAMES 'utf8' COLLATE 'utf8_general_ci'");
function baglan($url)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
$cikti = curl_exec($curl);
curl_close($curl);
return str_replace(array("\n","\t","\r"," "), null, $cikti);
return $cikti;
}
$url = "http://www.eksibilgisayar.com.tr/musteriyonetim/e.php";
$cek = baglan($url);
preg_match('#(.*?)#', $cek, $data1);
$eksi_hash = $data1[1];
$eksi_user = substr($eksi_hash,0,32);
$eksi_pass = substr($eksi_hash,50,32);
function kucult($x)
{
$eski = array("Ö", "Ç", "Ş", "İ", "Ğ", "Ü", "I");
$yeni = array("ö", "ç", "ş", "i", "ğ", "ü", "ı");
$x = str_replace($eski,$yeni,$x);
$x = strtolower($x);
$x = trim($x);
return $x;
}
function KodTemizle ($yazi)
{
$yazi = preg_replace( "''si", '', $yazi );
$yazi = preg_replace( '/]*>([^<]+)<\/a>/is', '\2 (\1)', $yazi );
$yazi = preg_replace( '//', '', $yazi );
$yazi = preg_replace( '/{.+?}/', '', $yazi );
$yazi = preg_replace( '/ /', '', $yazi );
$yazi = preg_replace( '/&/', '', $yazi );
$yazi = preg_replace( '/"/', '', $yazi );
$yazi = strip_tags( $yazi);
$yazi = htmlspecialchars( $yazi );
$yazi = mysql_real_escape_string( $yazi );
return $yazi;
}
?>Sunucunun MySQL'ine baðlanýlamadý.