BLOG main image
분류 전체보기 (24)
산행기 (6)
여행기 (0)
독후감 (1)
Computation (9)
기타 (2)
web 2.0 (1)
Javascript (0)
사람사는세상 (2)
jQuery (1)
건강하게삽시다 (0)
경제 (0)
63,216 Visitors up to today!
Today 1 hit, Yesterday 10 hit
daisy rss
tistory 티스토리 가입하기!
2007.08.24 19:21

* 구글 등에서 처럼 국가별 언어가 다른 페이지를 자동으로 로딩할 때 사용

* 국가별 접속 제한으로 사용하기에는 문제가 있다
(헤더의 언어로 접속을 제한하는 것이기 때문에 윈도우를 다른 국가 버전을 쓴다면 접속을 막을 수 없다.)


* ip 접속제한의 경우 ip를 일일이 검색해야 하므로 효율성이 없고, 리눅스에서 iptable을 사용하는 방법이 있다. superuser.co.kr 홍석범씨 글 참조

* HTTP_ACCEPT_LANGUAGE의 언어 설정

Afrikaans (af)
Albanian (sq)
Basque (eu)
Bulgarian (bg)
Byelorussian (be)
Catalan (ca)
Chinese (zh)
Chinese/China (zh-cn)
Chinese/Taiwan (zh-tw)
Chinese/Hong Kong (zh-hk)
Chinese/singapore (zh-sg)
Croatian (hr)
Czech (cs)
Danish (da)
Dutch (nl)
Dutch/Belgium (nl-be)
English (en)
English/United Kingdom (en-gb)
English/United Satates (en-us)
English/Australian (en-au)
English/Canada (en-ca)
English/New Zealand (en-nz)
English/Ireland (en-ie)
English/South Africa (en-za)
English/Jamaica (en-jm)
English/Belize (en-bz)
English/Trinidad (en-tt)
Estonian (et)
Faeroese (fo)
Farsi (fa)
Finnish (fi)
French (fr)
French/Belgium (fr-be)
French/France (fr-fr)
French/Switzerland (fr-ch)
French/Canada (fr-ca)
French/Luxembourg (fr-lu)
Gaelic (gd)
Galician (gl)
German (de)
German/Austria (de-at)
German/Germany (de-de)
German/Switzerland (de-ch)
German/Luxembourg (de-lu)
German/Liechtenstein (de-li)
Greek (el)
Hindi (hi)
Hungarian (hu)
Icelandic (is)
Indonesian (id or in)
Irish (ga)
Italian (it)
Italian/ Switzerland (it-ch)
Japanese (ja)
Korean (ko)
Latvian (lv)
Lithuanian (lt)
Macedonian (mk)
Malaysian (ms)
Maltese (mt)
Norwegian (no)
Polish (pl)
Portuguese (pt)
Portuguese/Brazil (pt-br)
Rhaeto-Romanic (rm)
Romanian (ro)
Romanian/Moldavia (ro-mo)
Russian (ru)
Russian /Moldavia (ru-mo)
Scots Gaelic (gd)
Serbian (sr)
Slovack (sk)
Slovenian (sl)
Sorbian (sb)
Spanish (es or es-do)
Spanish/Argentina (es-ar)
Spanish/Colombia (es-co)
Spanish/Mexico (es-mx)
Spanish/Spain (es-es)
Spanish/Guatemala (es-gt)
Spanish/Costa Rica (es-cr)
Spanish/Panama (es-pa)
Spanish/Venezuela (es-ve)
Spanish/Peru (es-pe)
Spanish/Ecuador (es-ec)
Spanish/Chile (es-cl)
Spanish/Uruguay (es-uy)
Spanish/Paraguay (es-py)
Spanish/Bolivia (es-bo)
Spanish/El salvador (es-sv)
Spanish/Honduras (es-hn)
Spanish/Nicaragua (es-ni)
Spanish/Puerto Rico (es-pr)
Sutu (sx)
Swedish (sv)
Swedish/Findland (sv-fi)
Thai (ts)
Tswana (tn)
Turkish (tr)
Ukrainian (uk)
Urdu (ur)
Vietnamese (vi)
Xshosa (xh)
Yiddish (ji)
Zulu (zu)

예)

<?

if($HTTP_ACCEPT_LANGUAGE != "zh-hk") {
  echo "
  <script>
  alert('이 사이트는 홍콩 지역에서만 접속이 가능합니다.');
  </script>
  ";
}

$var = substr($HTTP_ACCEPT_LANGUAGE,0,2);
switch($var) {
    Case "ko":
        echo "<meta http-equiv='Refresh' content='0; URL=http://kr.yahoo.com'>";
    Case "ja":
        echo "<meta http-equiv='Refresh' content='0; URL=http://jp.yahoo.com'>";
    Case "zh":
        echo "<meta http-equiv='Refresh' content='0; URL=http://zh.yahoo.com'>";
  default:
    echo "<meta http-equiv='Refresh' content='0; URL=http://www.yahoo.com'>";

}
?>

writing service for uni | 2012.03.20 22:05 | PERMALINK | EDIT/DEL | REPLY
Superior web-site. Nice posting comments system. I am sorry for the off-topic post, nevertheless I ended up being incredibly impressed with Djokovic\'s play in the final of the Australia OPen this year. The guy is simply unrivaled. He exhibited he had been as powerful as stainlesss steel. Simply imagine about he he could overcome Nadal who had been so enthusiastic to succeed as well as really was so energized up during the 5th set. I am beginning to believe that Djokovic is doing some psychic work to bring some forces on his side that assist him secure these kinds of matches against the best players in the planet. Whats your opinion in relation to Rafa's game?
Name
Password
Homepage
Secret