当前位置: 首页>>代码示例>>PHP>>正文


PHP emoji_unified_to_html函数代码示例

本文整理汇总了PHP中emoji_unified_to_html函数的典型用法代码示例。如果您正苦于以下问题:PHP emoji_unified_to_html函数的具体用法?PHP emoji_unified_to_html怎么用?PHP emoji_unified_to_html使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了emoji_unified_to_html函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: hasmemcache

function hasmemcache($mem)
{
    global $wecha_id, $point;
    //从memcache服务器获取数据
    $data = $mem->get(realpath("..") . $wecha_id);
    //判断memcache是否有数据
    if (!$data) {
        require 'db.php';
        include '../wall/biaoqing.php';
        $sql = "SELECT * FROM  `weixin_shake_toshake` WHERE wecha_id='{$wecha_id}'";
        $query1 = mysql_query($sql, $link) or die(mysql_error());
        $q = mysql_fetch_assoc($query1);
        if ($q) {
            $q['phone'] = pack('H*', $q['phone']);
            $q['phone'] = emoji_unified_to_html(emoji_softbank_to_unified($q['phone']));
            $mem->set(realpath("..") . $q['wecha_id'], $q, MEMCACHE_COMPRESSED, 3600);
        }
    }
    $data = $mem->get(realpath("..") . $wecha_id);
    $start = realpath("..") . "UPDATE  `weixin_wall_config` SET  `isopen` = ";
    $key2 = substr(md5($start), 10, 8);
    $ispen = $mem->get($key2);
    if ($data) {
        $data['point'] = $point;
        $mem->set(realpath("..") . $wecha_id, $data, MEMCACHE_COMPRESSED, 3600);
    } else {
        $ispen = 3;
    }
    if (empty($ispen)) {
        $ispen = 1;
    }
    echo $ispen;
    $mem->close();
    //关闭memcache连接
}
开发者ID:renzg,项目名称:wxwall,代码行数:35,代码来源:commit.php

示例2: __construct

 function __construct()
 {
     global $_W;
     $user_agent = $_SERVER['HTTP_USER_AGENT'];
     if (strpos($user_agent, 'MicroMessenger') === true) {
         $openid = $_W['fans']['from_user'];
         if (empty($openid)) {
             $this->pub_fans = o2::getOuser();
             if (empty($this->pub_fans['openid'])) {
                 message('获取信息失败,请确保是认证服务号或者借用授权的AppId和AppSecret正确');
             }
             $fans = pdo_fetch('SELECT * FROM' . tablename('fans') . " WHERE weid = :weid AND from_user = :from_user", array(':weid' => $_W['weid'], ':from_user' => $this->pub_fans['openid']));
             $user = array('nickname' => emoji_unified_to_html($this->pub_fans['nickname']), 'gender' => $this->pub_fans['sex'], 'residecity' => $this->pub_fans['city'], 'resideprovince' => $this->pub_fans['province'], 'nationality' => $this->pub_fans['country'], 'avatar' => $this->pub_fans['headimgurl']);
             if (empty($fans)) {
                 $user['createtime'] = TIMESTAMP;
                 $user['weid'] = $_W['weid'];
                 $user['from_user'] = $this->pub_fans['openid'];
                 pdo_insert('fans', $user);
             } else {
                 pdo_update('fans', $user, array('weid' => $_W['weid'], 'from_user' => $this->pub_fans['openid']));
             }
         } else {
             $this->pub_fans = o2::getFans($openid);
         }
     }
     //print_r($this->pub_fans);
     //exit();
 }
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:28,代码来源:site.php

示例3: auth3

 public function auth3($code)
 {
     $result = $this->get_access_token($code);
     if (!isset($result->errcode)) {
         $this->access_token = $result->access_token;
         $this->expires_in = $result->expires_in;
         $this->refresh_token = $result->refresh_token;
         $this->openid = $result->openid;
         $userInfo = $this->getUserInfo();
         // 改变头像的分辨率
         $userInfo->headimgurl = substr($userInfo->headimgurl, 0, strlen($userInfo->headimgurl) - 1) . '/96';
         // 改变emoji表情编码
         $userInfo->nickname = emoji_softbank_to_unified($userInfo->nickname);
         $userInfo->nickname_html = emoji_unified_to_html($userInfo->nickname);
         Session::put('userInfo', $userInfo);
         if ($userInfo->openid == 'oTIXKt2z1AAxHMxi8MHDaYP4GkzU') {
             return Redirect::to('http://wechat.100steps.net/healing2014/test/vote');
         } else {
             // echo '治愈系工地施工中~';
             return Redirect::to('http://wechat.100steps.net/healing2014/test/vote');
         }
     } else {
         echo 'Invalid code!';
     }
 }
开发者ID:100steps,项目名称:healing2014,代码行数:25,代码来源:HealingController.php

示例4: emoji_c

function emoji_c($body)
{
    $emoji_android = array("", "", "", "⛅", "", "", "", "❄", "", "", "", "", "", "⌚", "⌛", "✉", "", "", "", "", "", "", "✒", "✏", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "");
    $emoji_ios = array("☺", "⭐", "☀", "⛅", "☁", "⚡", "☔", "❄", "⛄", "❤", "☝", "✌", "☎", "⌚", "⌛", "✉", "✂", "🀄", "⚽", "⚾", "⛳", "☕", "✒", "✏", "⛪", "⛺", "⛲", "⛵", "⛲", "✈", "⚠", "⛽", "♨", "⬆", "⬇", "⬅", "➡", "↗", "↖", "↘", "↙", "◀", "▶", "🈯", "🈚", "🅿", "♿", "㊙", "㊙", "✳", "✴", "♈", "♉", "♊", "♋", "♌", "♍", "♎", "♏", "♐", "♑", "♒", "♓", "⭕", "〽", "♠", "♥", "♣", "♦");
    $body = str_replace($emoji_android, $emoji_ios, $body);
    $body = str_replace($emoji_native, $emoji_bytes, $body);
    return emoji_unified_to_html($body);
}
开发者ID:checkwa,项目名称:API-CheckWa,代码行数:8,代码来源:emoji.php

示例5: printMessage

function printMessage($string)
{
    $array = explode(" ", $string);
    $text = "";
    foreach ($array as $word) {
        $text .= emoji_unified_to_html($word) . ' ';
    }
    return $text;
}
开发者ID:AdrianClv,项目名称:BlockchainWall,代码行数:9,代码来源:functions.php

示例6: Emojify

 private function Emojify($data)
 {
     $data = emoji_docomo_to_unified($data);
     # DoCoMo devices
     $data = emoji_kddi_to_unified($data);
     # KDDI & Au devices
     $data = emoji_softbank_to_unified($data);
     # Softbank & (iPhone) Apple devices
     $data = emoji_google_to_unified($data);
     # Google Android devices
     return emoji_unified_to_html($data);
 }
开发者ID:edward-tsai,项目名称:vanilla4china,代码行数:12,代码来源:default.php

示例7: removeEmoji

 public static function removeEmoji($data)
 {
     require_once Application::getInstance()->getBasePath() . '/php-emoji/emoji.php';
     $data = emoji_docomo_to_unified($data);
     # DoCoMo devices
     $data = emoji_kddi_to_unified($data);
     # KDDI & Au devices
     $data = emoji_softbank_to_unified($data);
     # Softbank & pre-iOS6 Apple devices
     $data = emoji_google_to_unified($data);
     # Google Android devices
     $data = emoji_unified_to_html($data);
     $data = preg_replace('/[^а-яa-z0-9 _\\-\\+\\&\\.\\,\\!@#\\$\\n\\t<>=\\/"\\(\\)\\*:]/ui', '', $data);
     return $data;
 }
开发者ID:petun,项目名称:ipad-slider,代码行数:15,代码来源:StrHelper.php

示例8: hasmemcache

function hasmemcache($mem)
{
    global $wecha_id, $point;
    $sql = 'SELECT * FROM  `weixin_shake_toshake`';
    $memsql = realpath("..") . 'SELECT * FROM  `weixin_shake_toshake`';
    $key = substr(md5($memsql), 10, 8);
    //从memcache服务器获取数据
    $data = $mem->get($key);
    //判断memcache是否有数据
    if (!$data) {
        require 'db.php';
        include '../wall/biaoqing.php';
        $query1 = mysql_query($sql, $link) or die(mysql_error());
        $i = 1;
        while ($q = mysql_fetch_assoc($query1)) {
            $q['phone'] = pack('H*', $q['phone']);
            $q['phone'] = emoji_unified_to_html(emoji_softbank_to_unified($q['phone']));
            $data[$i] = $q;
            $mem->set('shakeu' . $q['wecha_id'], $i, MEMCACHE_COMPRESSED, 3600);
            $i++;
        }
        //向memcache服务器存储数据,还要设置失效时间(单位为秒)
        $mem->set($key, $data, MEMCACHE_COMPRESSED, 3600);
    }
    $start = realpath("..") . "UPDATE  `weixin_wall_config` SET  `isopen` = ";
    $key2 = substr(md5($start), 10, 8);
    $ispen = $mem->get($key2);
    $id = $mem->get(realpath("..") . 'shakeu' . $wecha_id);
    if ($id) {
        $data = $mem->get($key);
        if ($wecha_id == 'oNsvDt8r_t_Wxn0e6crbFuSPutXY') {
            $data[$id]['point'] = $point * 1.3;
        } else {
            $data[$id]['point'] = $point;
        }
        $mem->set($key, $data, MEMCACHE_COMPRESSED, 3600);
    } else {
        $ispen = 3;
    }
    if (empty($ispen)) {
        $ispen = 1;
    }
    echo $ispen;
    $mem->close();
    //关闭memcache连接
}
开发者ID:robot0516,项目名称:wxsq,代码行数:46,代码来源:commit_zb.php

示例9: lurushake

function lurushake($wecha_id)
{
    $sql_flg = "SELECT * FROM  `weixin_flag` WHERE `openid` = '{$wecha_id}'";
    $query_num = mysql_query($sql_flg);
    $q = mysql_fetch_row($query_num);
    $nicheng = $q[4];
    $avatar = $q[5];
    //实例化一个memcache对象
    if (!empty($_SERVER['HTTP_APPNAME'])) {
        @($mem = memcache_init());
    } else {
        if (class_exists("Memcache")) {
            @($mem = new Memcache());
            @$mem->connect('localhost', '11211');
        }
    }
    if (!empty($mem)) {
        include '../wall/biaoqing.php';
        $shakeu = $mem->get(realpath("..") . 'shakeu' . $wecha_id);
        if (empty($shakeu)) {
            $memsql = realpath("..") . 'SELECT * FROM  `weixin_shake_toshake`';
            $key = substr(md5($memsql), 10, 8);
            //从memcache服务器获取数据
            $data = $mem->get($key);
            $arrnum = count($data) + 1;
            $mem->set(realpath("..") . 'shakeu' . $wecha_id, $arrnum, MEMCACHE_COMPRESSED, 3600);
            $cachenick = pack('H*', $nicheng);
            $cachenick = emoji_unified_to_html(emoji_softbank_to_unified($cachenick));
            $addarr = array('id' => 'new', 'phone' => $cachenick, 'wecha_id' => $wecha_id, 'point' => 0, 'avatar' => $avatar);
            array_push($data, $addarr);
            $mem->set($key, $data, MEMCACHE_COMPRESSED, 3600);
        }
    }
    $sql_shake = "replace  `weixin_shake_toshake` (`wecha_id`,`phone`,`point`,`avatar`) VALUES ('{$wecha_id}','{$nicheng}','0','{$avatar}')";
    mysql_query($sql_shake);
    $xuanze = "SELECT * FROM  `weixin_flag` WHERE  `openid` =  '{$wecha_id}'";
    $chaxun = mysql_query($xuanze) or die(mysql_error());
    $q = mysql_fetch_array($chaxun);
    if ($q[nickname] == '') {
        return 1;
    }
}
开发者ID:robot0516,项目名称:wxsq,代码行数:42,代码来源:function.php

示例10: foreach

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>EMoji HTML Test</title>
	<link href="emoji.css" rel="stylesheet" type="text/css" />
</head>
<body>

<table border="1">
	<tr>
		<th>Unified</th>
		<th>Name</th>
		<th>Unified Text</th>
		<th>HTML</th>
	</tr>
<?php 
foreach (array(0x2600, 0x1f493, 0x1f502) as $unified) {
    $bytes = "Hello " . emoji_utf8_bytes($unified) . " World";
    echo "<tr>\n";
    echo "<td>" . sprintf('U+%04X', $unified) . "</td>\n";
    echo "<td>" . HtmlSpecialChars(emoji_get_name($unified)) . "</td>\n";
    echo "<td>{$bytes}</td>\n";
    echo "<td>" . emoji_unified_to_html($bytes) . "</td>\n";
    echo "</tr>\n";
}
?>
</table>

</body>
</html>
开发者ID:prada1120,项目名称:php-emoji,代码行数:31,代码来源:html_demo.php

示例11: foreach

                <?php 
foreach ($communicatee_ids as $communicatee_id) {
    $communicatee = \app\models\Muser::findOne(['id' => $communicatee_id]);
    ?>
                    <li class="table-view-cell media">
                        <a data-ignore="push" class="navigate-right" href="<?php 
    echo \yii\helpers\Url::to(['wechat-messaging', 'gh_id' => $wx_user->gh_id, 'openid' => $wx_user->openid, 'reciever_id' => $communicatee_id, 'backwards' => true]);
    ?>
">
                            <img class="media-object pull-left" src="<?php 
    echo $communicatee->headImgUrl;
    ?>
" style="width:48px;">
                            <div class="media-body">
                                <?php 
    echo emoji_unified_to_html(emoji_softbank_to_unified($communicatee->nickname));
    ?>
                            </div>
                        </a>
                    </li>
                   
                <?php 
}
?>
                </ul>
            </div>
        </div>


        <!-- ######################BEGIN OF FOOTER###################### -->
        <div class="bar bar-tab">
开发者ID:noikiy,项目名称:wowewe,代码行数:31,代码来源:wechat-messaging.php

示例12: emoji_unified_to_html

    if ($vote_cnt > 20) {
        break;
    }
    $friend = \app\models\MUser::findOne(['openid' => $tp_friend->vote_openid]);
    ?>
                    <li class="table-view-cell media">
  
                    <img class="media-object pull-left" src="<?php 
    echo $friend->headImgUrl;
    ?>
" width="64" height="64">

                    <div class="media-body">
                      <!--粉丝昵称--> 
                      <?php 
    echo emoji_unified_to_html(emoji_softbank_to_unified($friend->nickname));
    ?>
                      <p>
                          拆红包时间:<?php 
    echo $tp_friend->vote_time;
    ?>
                      </p>
                    </div>
                        
                    </li>
                    <?php 
}
?>
                </ul>
            
开发者ID:noikiy,项目名称:wowewe,代码行数:29,代码来源:zhongqiu-vote.php

示例13: googleToHtml

 public function googleToHtml($sentence)
 {
     return emoji_unified_to_html(emoji_google_to_unified($sentence));
 }
开发者ID:andywooyay,项目名称:OhEmojiBundle,代码行数:4,代码来源:EmojiExtension.php

示例14: bytes

?>
" alt="Emojis" height="18" width="19"></a>
        </div>
        <button class="btn btn-secondary" type="submit">Send</button>
      </form>
      <span id="bytes">0</span> bytes (<span id="transactions">1</span> transactions)
      <!-- Emojis -->
      <div id="emojisTable" class="emojisContainer">
        <button type="button" class="close" aria-label="Close">
          <span aria-hidden="true">&times;</span>
          <span class="sr-only">Close</span>
        </button>
        <div class="p-tr-25">
<?php 
foreach ($GLOBALS['emoji_maps']['names'] as $code => $text) {
    echo emoji_unified_to_html($code);
}
?>
        </div>
      </div>
    </div>
  </div>
</div>
<?php 
require_once TEMPLATES_PATH . "/footer.php";
?>
<script>
// Update the number of bytes when writting a new char
$('#message').keyup(function(){
  var bytes = getByteLen($('#message').val());
开发者ID:AdrianClv,项目名称:BlockchainWall,代码行数:30,代码来源:sendMessage.php

示例15: utf8_bytes

$test_iphone = "Hello " . utf8_bytes(0xe221);
$test_docomo = "Hello " . utf8_bytes(0xe6e7);
$test_kddi = "Hello " . utf8_bytes(0xe527);
$test_google = "Hello " . utf8_bytes(0xfe833);
$test_html = "Hello <span class=\"emoji emoji3620e3\"></span>";
is(emoji_docomo_to_unified($test_docomo), $test_unified, "DoCoMo -> Unified");
is(emoji_kddi_to_unified($test_kddi), $test_unified, "KDDI -> Unified");
is(emoji_softbank_to_unified($test_iphone), $test_unified, "Softbank -> Unified");
is(emoji_google_to_unified($test_google), $test_unified, "Google -> Unified");
echo "#------------------\n";
is(emoji_unified_to_docomo($test_unified), $test_docomo, "Unified -> DoCoMo");
is(emoji_unified_to_kddi($test_unified), $test_kddi, "Unified -> KDDI");
is(emoji_unified_to_softbank($test_unified), $test_iphone, "Unified -> Softbank");
is(emoji_unified_to_google($test_unified), $test_google, "Unified -> Google");
echo "#------------------\n";
is(emoji_unified_to_html($test_unified), $test_html, "Unified -> HTML");
is(emoji_html_to_unified($test_html), $test_unified, "HTML -> Unified");
echo "#------------------\n";
#
# names are accessed by the unified codepoint (which makes it tricky for 2-codepoint unicode symbols)
#
is(emoji_get_name(utf8_bytes(0x2600)), 'BLACK SUN WITH RAYS', "name U+2600");
is(emoji_get_name(utf8_bytes(0x26ea)), 'CHURCH', "name U+26EA");
is(emoji_get_name(utf8_bytes(0x1f480)), 'SKULL', "name U+1F480");
is(emoji_get_name(utf8_bytes(0x1f450)), 'OPEN HANDS SIGN', "name U+1F450");
is(emoji_get_name(utf8_bytes(0x1f52b)), 'PISTOL', "name U+1F52B");
is(emoji_get_name(utf8_bytes(0x36) . utf8_bytes(0x20e3)), 'KEYCAP 6', "name U+36 U+20E3");
#
# below here are the test helper functions
#
function is($got, $expected, $name)
开发者ID:lilylv1988,项目名称:php-emoji,代码行数:31,代码来源:test.php


注:本文中的emoji_unified_to_html函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。