Son sekliyle asagidaki gibi yaptim; ancak hata devam ediyor;
dinle.php <iframe name="oyver" src="oylar.php?muzik_id=<?php echo $muzik_id;?>" width="280" height="35" scrolling="no" frameborder="0" marginwidth="0" marginheight="0"></iframe>
oylar.php <form action="oyver.php?muzik_id=<? echo $_GET['muzik_id'];?>" method="GET" target="oyver">
<center><input type="radio" name="oy" value="5" checked="checked" /> 5
<input type="radio" name="oy" value="6" /> 6
<input type="radio" name="oy" value="7" /> 7
<input type="radio" name="oy" value="8" /> 8
<input type="radio" name="oy" value="9" /> 9
<input type="radio" name="oy" value="10" /> 10
<input type="submit" name="oyla" value="OYLA" />
</center>
</form>
oyver.php <?
include("ayar.php");
function real_ip_adress() {
global $HTTP_SERVER_VARS;
$gizli_ipler = array( '10.0.0.', '192.168.', '127.0.0.', '172.16.0.' );
if( isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '' ) {
$ip_strings = explode( ',',$_SERVER['HTTP_X_FORWARDED_FOR']);
foreach($ip_strings as $k => $v) {
if( empty($v) ) {
unset( $ip_strings[$k] );
} else {
if(!isset($ip_string)) {
$ip_string = $v;
}
}
}
}
if( isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] != '' ) {
$ip_strings[] = $_SERVER['REMOTE_ADDR'];
if(!isset($ip_string)) {
$ip_string = $_SERVER['REMOTE_ADDR'];
}
}
foreach($ip_strings as $k1 => $ip) {
foreach($gizli_ipler as $k2 => $pip) {
if(strpos($ip, $pip) === 0) {
unset($ip_strings[$k1]); break;
}
}
}
if(!empty($ip_strings) ) {
foreach( $ip_strings as $v ) {
if(!empty($v)) {
$ip_string = $v;
$is_local_ip = false;
break;
}
}
} else {
$is_local_ip = true;
}
return $ip_string;
}
$ip = real_ip_adress();
$a=$_GET['muzik_id'];
$oy=$_GET['oy'];
$s=mysql_query("SELECT * FROM oylama where ip='$ip' and muzik_id='$a'");
$kactane=mysql_num_rows($s);
if($kactane>0){
print ("<script language='javascript'>alert('Daha Önce Oy Kullandiniz');history.go(-1);</script>");
exit; };
}else{
$sorgu=mysql_query("INSERT INTO oylama (oy, muzik_id, ip) values ('$oy', '$a', '$ip')");
print ("<script language='javascript'>alert('Oy Kullandiginiz İcin Tesekkürler');history.go(-1);</script>");
exit; }
?>