本文整理汇总了PHP中uc_api_input函数的典型用法代码示例。如果您正苦于以下问题:PHP uc_api_input函数的具体用法?PHP uc_api_input怎么用?PHP uc_api_input使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uc_api_input函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uc_avatar
function uc_avatar($uid)
{
$uid = intval($uid);
$uc_input = uc_api_input("uid={$uid}");
$uc_avatarflash = UC_API . '/images/camera.swf?inajax=1&appid=' . UC_APPID . '&input=' . $uc_input . '&agent=' . md5($_SERVER['HTTP_USER_AGENT']) . '&ucapi=' . urlencode(UC_API);
return '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9" width=447 height=477 id="mycamera"><param name="movie" value="' . $uc_avatarflash . '"><param name="quality" value="high"><param name="menu" value="false"><embed src="' . $uc_avatarflash . '" quality="high" menu="false" width="447" height="477" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" name="mycamera" swLiveConnect="true"></embed></object>';
}
示例2: uc_avatar
function uc_avatar($uid, $type = 'virtual', $returnhtml = 1)
{
$uid = intval($uid);
$uc_input = uc_api_input("uid={$uid}");
$uc_avatarflash = UC_API . '/images/camera.swf?inajax=1&appid=' . UC_APPID . '&input=' . $uc_input . '&agent=' . md5($_SERVER['HTTP_USER_AGENT']) . '&ucapi=' . urlencode(str_replace('http://', '', UC_API)) . '&avatartype=' . $type . '&uploadSize=2048';
if ($returnhtml) {
return '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="450" height="253" id="mycamera" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="scale" value="exactfit" />
<param name="wmode" value="transparent" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="movie" value="' . $uc_avatarflash . '" />
<param name="menu" value="false" />
<embed src="' . $uc_avatarflash . '" quality="high" bgcolor="#ffffff" width="450" height="253" name="mycamera" align="middle" allowScriptAccess="always" allowFullScreen="false" scale="exactfit" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>';
} else {
return array('width', '450', 'height', '253', 'scale', 'exactfit', 'src', $uc_avatarflash, 'id', 'mycamera', 'name', 'mycamera', 'quality', 'high', 'bgcolor', '#ffffff', 'menu', 'false', 'swLiveConnect', 'true', 'allowScriptAccess', 'always');
}
}
示例3: capi_uc_avatar
/**
* 修改头像
*
* @param int $uid 用户ID
* @param string $type 头像类型 real OR virtual 默认为 virtual
* @return string
*/
function capi_uc_avatar($uid, $type = 'virtual', $returnurl = 0)
{
$uid = intval($uid);
$uc_input = uc_api_input("uid={$uid}");
if ($returnurl) {
$uc_avatar = UC_API . '/index.php?a=uploadavatar4m&m=user&inajax=1&appid=' . UC_APPID . '&input=' . $uc_input . '&agent=' . md5($_SERVER['HTTP_USER_AGENT']) . '&avatartype=' . $type;
return $uc_avatar;
}
return array('UC_API' => UC_API, 'appid' => UC_APPID, 'input' => $uc_input, 'agent' => md5($_SERVER['HTTP_USER_AGENT']), 'ucapi' => urlencode(UC_API), 'avatartype' => $type);
}