Created
November 1, 2013 07:15
-
-
Save upsilon/7261894 to your computer and use it in GitHub Desktop.
OpenPNE_KtaiEmoji::relation_list を json 形式にして出力する何か
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $vendorPath = './lib/vendor'; | |
| set_include_path(get_include_path().PATH_SEPARATOR.$vendorPath); | |
| require_once $vendorPath.'/OpenPNE2/KtaiEmoji.php'; | |
| $emoji = new OpenPNE_KtaiEmoji(); | |
| $relation_list = $emoji->relation_list; | |
| // Docomo絵文字への変換分だけ出力 | |
| $output = array( | |
| 's' => array('i' => $relation_list['s']['i']), | |
| 'e' => array('i' => $relation_list['e']['i']), | |
| ); | |
| echo <<<EOT | |
| /** | |
| * @copyright 2005-2008 OpenPNE Project | |
| * @license http://www.php.net/license/3_01.txt PHP License 3.01 | |
| */ | |
| EOT; | |
| echo json_encode($output); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
これを使ってクライアントサイドで絵文字 (
[i:1]とか) を img 要素に変換できないかなといふ妄想