3 Ajax Chat for TRPG ver.2.6
4 (c)2007-2009 Cake All Rights Reserved.
5 Mail : cake_67@users.sourceforge.jp
6 Home : http://trpgtools-onweb.sourceforge.jp/
12 ini_set('log_errors', false);
13 ini_set('error_log', "./php_error.log");
16 require_once './trpgchat-ini.php';
17 require_once './lib/trpgchat.php';
20 set_config(read_config());
23 if (!COOKIE || !intval(COOKEI_EXPIRE)) {
24 error("クッキー無効のため、読み込みできません");
29 $host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
30 $ua = getenv("HTTP_USER_AGENT");
37 if (!$_FILES['cookieFileName']
38 || ($_FILES['cookieFileName']['type'] != 'text/plain')) {
42 $data = file($_FILES['cookieFileName']['tmp_name']);
47 if (substr($data[0], 0, 9) != 'name_off=') {
52 $expires = time() + intval(COOKEI_EXPIRE) * 60 * 60 * 24;
53 $domain = $_SERVER["SERVER_NAME"];
55 setcookie(COOKIE, $data[0], $expires, $path, '.'.$domain);
58 $self_url = get_self_url();
59 $url = str_replace('cookie_load.php', 'index.php', $self_url);
61 header('Location: '. $url);