OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / include / lib / MobilePictogramConverter-1.2.0 / example / i_sjis.php
1 <?php\r
2 ini_set('error_reporting', E_ALL);\r
3 require_once '../MobilePictogramConverter.php';\r
4 \r
5 header('Content-Type: text/html; charset=Shift_JIS');\r
6 \r
7 /* \83o\83C\83i\83\8a\83R\81[\83h */\r
8 $str    = '\82 ø\9fø \82¢ø¡ø¢\82¤\82¦ù³\82¨ù´ùµ';\r
9 $option = MPC_FROM_OPTION_RAW;\r
10 /* Web\93ü\97Í\83R\81[\83h */\r
11 //$str    = "\82 &#63647;&#63648;\82¢&#63649;&#63650;\82¤&#63651;&#xE70C;\82¦&#xE70D;&#xE70E;\82¨&#xE70F;&#xE710;";\r
12 //$option = MPC_FROM_OPTION_WEB;\r
13 /* \89æ\91\9c */\r
14 #$str    = '\82 w<img src="../img/i/63647.gif" alt="" border="0" width="12" height="12" /><img src="../img/i/63648.gif" alt="" border="0" width="12" height="12" />\82¢<img src="../img/i/63649.gif" alt="" border="0" width="12" height="12" /><img src="../img/i/63650.gif" alt="" border="0" width="12" height="12" />\82¤<img src="../img/i/63651.gif" alt="" border="0" width="12" height="12" /><img src="../img/i/63921.gif" alt="" border="0" width="12" height="12" />\82¦<img src="../img/i/63922.gif" alt="" border="0" width="12" height="12" /><img src="../img/i/63923.gif" alt="" border="0" width="12" height="12" />\82¨<img src="../img/i/63924.gif" alt="" border="0" width="12" height="12" /><img src="../img/i/63925.gif" alt="" border="0" width="12" height="12" />';\r
15 #$option = MPC_FROM_OPTION_IMG;\r
16 \r
17 $mpc =& MobilePictogramConverter::factory($str, MPC_FROM_FOMA, MPC_FROM_CHARSET_SJIS, $option);\r
18 if (is_object($mpc) == false) {\r
19         die($mpc);\r
20 }\r
21 $mpc->setImagePath("../img/");\r
22 ?>\r
23 <html>\r
24 <head>\r
25 <meta http-equiv="content-type" content="text/html; charset=Shift_JIS">\r
26 <title>i-mode\8aG\95\8e\9a\82©\82ç\82Ì\95Ï\8a· (SJIS)</title>\r
27 </head>\r
28 <body>\r
29 <?php\r
30 /* \83\86\81[\83U\81[\83G\81[\83W\83F\83\93\83g\82©\82ç\82Ì\8e©\93®\95Ï\8a· */\r
31 echo "Auto :".$mpc->autoConvert()."<br />\r\n";\r
32 /* \8aG\95\8e\9a\8dí\8f\9c */\r
33 echo 'Delete : '.$mpc->Except().'<br />'."\r\n";\r
34 /* \95\8e\9a\97ñ\82É\8aÜ\82Ü\82ê\82Ä\82¢\82é\8aG\95\8e\9a\82Ì\90\94 */\r
35 echo 'Count : '.$mpc->Count().'<br />'."\r\n";\r
36 \r
37 /* \83\82\83o\83C\83\8b\95\\8e¦\97p\81iWeb\93ü\97Í\83R\81[\83h\81j */\r
38 //echo 'FOMA : '    .$mpc->Convert(MPC_TO_FOMA    , MPC_TO_OPTION_WEB).'<br />'."\r\n";\r
39 //echo 'EZweb : '   .$mpc->Convert(MPC_TO_EZWEB   , MPC_TO_OPTION_WEB).'<br />'."\r\n";\r
40 //echo 'SoftBank : '.$mpc->Convert(MPC_TO_SOFTBANK, MPC_TO_OPTION_WEB).'<br />'."\r\n";\r
41 \r
42 /* \83\82\83o\83C\83\8b\95\\8e¦\97p\81i\83o\83C\83i\83\8a\83R\81[\83h\81j */\r
43 //echo 'FOMA : '    .$mpc->Convert(MPC_TO_FOMA    , MPC_TO_OPTION_RAW).'<br />'."\r\n";\r
44 //echo 'EZweb : '   .$mpc->Convert(MPC_TO_EZWEB   , MPC_TO_OPTION_RAW).'<br />'."\r\n";\r
45 //echo 'SoftBank : '.$mpc->Convert(MPC_TO_SOFTBANK, MPC_TO_OPTION_RAW).'<br />'."\r\n";\r
46 \r
47 /* PC\95\\8e¦\97p\81i\89æ\91\9c\81j */\r
48 //echo 'FOMA : '    .$mpc->Convert(MPC_TO_FOMA    , MPC_TO_OPTION_IMG).'<br />'."\r\n";\r
49 //echo 'EZweb : '   .$mpc->Convert(MPC_TO_EZWEB   , MPC_TO_OPTION_IMG).'<br />'."\r\n";\r
50 //echo 'SoftBank : '.$mpc->Convert(MPC_TO_SOFTBANK, MPC_TO_OPTION_IMG).'<br />'."\r\n";\r
51 ?>\r
52 </body>\r
53 </html>