Merhaba, aşağıdaki kodlar sitemdeki git.php dosyasına aittir.
Eski sunucumda kodlar normal çalışırken, yeni sunucuda hata veriyor.
Sanırım eski sunucu php4 kullanıyordu.
yardımcı olabilir misiniz.
Eski sunucumda kodlar normal çalışırken, yeni sunucuda hata veriyor.
Sanırım eski sunucu php4 kullanıyordu.
yardımcı olabilir misiniz.
Kod:
<?php
ob_start();
include ("config.php");
mysql_connect("$dbhost","$user","$pass");
mysql_select_db("$dbname");
$db=mysql_connect("$dbhost","$user","$pass") or die ("Can't connect to mySQL server");
$get_rows = mysql_db_query (katora,"Select adress from prg Where id=$id",$db) or die (mysql_error());
$rows = mysql_fetch_array($get_rows);
if ($HTTP_COOKIE_VARS['h']==$id) {
$url = urldecode($HTTP_GET_VARS[adress]);
header("Location: $rows[adress]");
} else {
$cookie = setcookie("h", $id, time()+3600*24*30*12*10);
mysql_db_query (katora,"update prg set hit=hit+1 Where id=$id",$db) or die (mysql_error());
$url = urldecode($HTTP_GET_VARS[adress]);
header("Location: $rows[adress]");
ob_end_flush();
}
?>