い
う
え
お';
//$option = MPC_FROM_OPTION_WEB;
/* 画像 */
//$str = 'あs
い
う
え
お';
//$option = MPC_FROM_OPTION_IMG;
$mpc =& MobilePictogramConverter::factory($str, MPC_FROM_EZWEB, MPC_FROM_CHARSET_UTF8, $option);
if (is_object($mpc) == false) {
die($mpc);
}
$mpc->setImagePath('../img/');
?>
EZweb絵文字からの変換 (UTF-8)
autoConvert().'
'."\r\n";
/* 絵文字削除 */
echo 'Delete : '.$mpc->Except().'
'."\r\n";
/* 文字列に含まれている絵文字の数 */
echo 'Count : '.$mpc->Count().'
'."\r\n";
/* モバイル表示用(Web入力コード) */
//echo 'EZweb : ' .$mpc->Convert(MPC_TO_EZWEB , MPC_TO_OPTION_WEB).'
'."\r\n";
//echo 'FOMA : ' .$mpc->Convert(MPC_TO_FOMA , MPC_TO_OPTION_WEB).'
'."\r\n";
//echo 'SoftBank : '.$mpc->Convert(MPC_TO_SOFTBANK, MPC_TO_OPTION_WEB).'
'."\r\n";
/* モバイル表示用(バイナリコード) */
//echo 'EZweb : ' .$mpc->Convert(MPC_TO_EZWEB , MPC_TO_OPTION_RAW).'
'."\r\n";
//echo 'FOMA : ' .$mpc->Convert(MPC_TO_FOMA , MPC_TO_OPTION_RAW).'
'."\r\n";
//echo 'SoftBank : '.$mpc->Convert(MPC_TO_SOFTBANK, MPC_TO_OPTION_RAW).'
'."\r\n";
/* PC表示用(画像) */
//echo 'EZweb : ' .$mpc->Convert(MPC_TO_EZWEB , MPC_TO_OPTION_IMG).'
'."\r\n";
//echo 'FOMA : ' .$mpc->Convert(MPC_TO_FOMA , MPC_TO_OPTION_IMG).'
'."\r\n";
//echo 'SoftBank : '.$mpc->Convert(MPC_TO_SOFTBANK, MPC_TO_OPTION_IMG).'
'."\r\n";
?>