絵文字表示ソフトバンク以下、「少年の顔」の絵文字を表示する。絵文字のバイナリコードは http://cgi.wap2.jp/emoji/softbank/ などで調べる。 HTMLのエンコーディングがシフトJISの場合<?php header('Content-type: text/html; charset=Shift_JIS'); ?> <html> <body> 絵文字: <?php $bin = pack('C*',hexdec('F9'),hexdec('41')); print $bin; ?> </body> </html> HTMLのエンコーディングがUTF8の場合<?php header('Content-type: text/html; charset=utf-8'); ?> <html> <body> 絵文字: <?php $bin = pack('C*',hexdec('EE'),hexdec('80'),hexdec('81')); print $bin; ?> </body> </html> |
|