//require ('common.inc');
$arr_request=array();
if (count($HTTP_GET_VARS))
{
while (list($key,$value)=each($HTTP_GET_VARS))
{
$arr_request[strto lower($key) ]=$値;
}
}
if (count($HTTP_POST_VARS))
{
WHILE (list($key,$value)=each($HTTP_POST_VARS))
{
$arr_request[strto lower($key)]=$value;
}
}
$link=@mysql_connect("localhost","kong","kong");
mysql_select_db("mywebdb");
$ip=$REMOTE_ADDR;
$current=getdate(time());
$day=$current["mday"];
$query="select * from addcount where day="$day"";
$result=@mysql_query($query);
if(!$num=@mysql_num_rows($result))
$num=1;
while($row=@mysql_fetch_row($result))
{
if (strcmp($ip,$row[1])==0)
{
$i=1 ;
$id=$row[0];
$click=$row[3] 1;
$up="update addcount set click_count=click_count 1 where id=$id";
$result2=@mysql_query($up);
// 休憩;
}
$total =$row[3];
}
$total ;
if(!$i){
$query1="addcount (ip,day,click_count )values ('$ip','$day',1) に挿入";
mysql_db_query("mywebdb",$query1,$link);
$click=1;
}
echo "