<?php
session_start();
if(isset($_SESSION['sessionid'])) { } else {
session_destroy();
}
function chat_keycode($select, $key, $server, $nick='', $id='', $level='') {
//이 함수는 절대 수정하지 마세요.
if($select)
return md5(md5(iconv(mb_detect_encoding($nick, "UTF-8, EUC-KR, ASCII"), 'UTF-8', $nick).$key).$level.iconv(mb_detect_encoding($id, "UTF-8, EUC-KR, ASCII"), 'UTF-8', $id).$key);
else
return md5(md5($server['REMOTE_ADDR'].$key).$key);
}
?>
<script src='http://uchat.co.kr/uchat.php' charset='UTF-8'>
<script type=''>
u_chat({
room:'mcsChat',
md5:'<?php echo chat_keycode(1, '토큰번호', $_SERVER, $_SESSION['sessionname'], $_SESSION['sessionid'], $_SESSION['sessionrank'])?>',
nick:'<?=$_SESSION['sessionname']?>',
mb_id:'<?=$_SESSION['sessionid']?>',
level:'<?=$_SESSION['sessionrank']?>',
<?php if($_SESSION['sessionrank'] == 24) { ?>
icon:'http://mcs.goanygate.com/IMG/rank/admin.jpg',
<?php } else { ?>
icon:'http://mcs.goanygate.com/IMG/rank/<?=($_SESSION['sessionrank'] + 1)?>.png',
<?php } ?>
chat_record:true,
no_inout:'1',
width:'600',
height:'600',
skin:'1',
view_mb_list:false
});
자체제작으로 사용하던 코드입니다.