외부페이지 DB 비교 후 사이트 이동

교교 2014.05.15 14:02:38

\modules\message\skins\default\http_status_code.html



<?

$ing='Wait ...';

echo $ing;


$myurl = $_SERVER['REQUEST_URI'];

$url_id = SUBSTR($myurl, 1);

mysql_connect('127.0.0.1','아이디','패스워드');

mysql_select_db('DB명');

$list_result =  mysql_query('SELECT * FROM xe_member');


while($row = mysql_fetch_array($list_result)){

$user_id = $row['user_id'];

$you_id = $row['extra_vars'];

$you_a= SUBSTR($you_id, 37);

$you_b= SUBSTR($you_a,0,-3);

if ($url_id == $user_id) {

echo("<script>location.href='$you_b'</script>");

}

}

?>


<script>

location.href="/Error";

</script>