-
ViewletCam
介绍: ViewletCam:ViewletCam 是由 Qarbon 公司推出的使用极其容易,内容又丰富精彩的多媒体制作工具,使用它可以快速的录制、编辑与修改由计算机屏幕上录制下来的完整动态图像,再制作出不可抗拒的互动 Viewlet 内容来吸引住你的顾客、合作伙伴以及内部员工。 ViewletCam 对屏幕中完整动画的录制功能提高了Viewl ...
-
用键盘控制音量的软件
推荐一款很小的软件,它是从IBM笔记本上移植下来的 不知道大家有没有用鼠标点击Windows桌面下小喇叭,来调节音量,感觉很费事的经验;特别是看电影或者玩游戏时调节音量很麻烦,所以一直再寻找一个好东东来替代那个小喇叭。 他可以胜任用键盘上任意一个键来控制声音的大小和开关,程序不用安装, 点击即可调入随 ...
-
FlashFXP 3.6.0 Build 1240 Final+注册(非破解)
序列号: FLASHFXPxgA9UrTnxgAAAAC7W5MNJwTnsl73n0Vuu1AePJgEAG 41mgSvHSiDWi1Kg8B5xJNCCCAVCMr9Rtmo6u93NoQF27wg6KrQ 3RIE8Jz6Qy/YlnYIBf58aRJrG7rGITgQJ4KSmyK0wz4xySS+0H N/9lJ65abJf7rB7m3R2vyjhakIKSzZnquXQ0/Rdv5nMS+Bbc7n rMqoYnTURE8jeePVOgIO9a4N89ORDsPW4uEtPjCXiyk1hVcse3 3uZgJ/H5KriA== 务必将以下 ...
-
解决MP3不能导入Flash的一种方法
相信有不少刚接触FLASH的朋友会有时遇到MP3格式的文件不能正常导入FLASH的情况~ 如图-1 20051121201104_01.jpg 图-1 那有时候我就会想到不行的话就转WAV格式.反正WAV能用就行呗~但是考虑到源文件太大这一问题来说.我昨天回去试了一下这个软件–Cool Edit Pro 2.0版.如图-2 2005112120 ...
-
PHP提取中文首字母
从别人程序中扒拉出来的不是原创。Dzender的代码学习用
PHP代码- function pykey( $py_key)
- {
- $pinyin = 65536 + pys($py_key);
- if ( 45217 <= $pinyin && $pinyin <= 45252 )
- {
- $zimu = “A”;
- return $zimu;
- }
- if ( 45253 <= $pinyin && $pinyin <= 45760 )
- {
- $zimu = “B”;
- return $zimu;
- }
- if ( 45761 <= $pinyin && $pinyin <= 46317 )
- {
- $zimu = “C”;
- return $zimu;
- }
- if ( 46318 <= $pinyin && $pinyin <= 46825 )
- {
- $zimu = “D”;
- return $zimu;
- }
- if ( 46826 <= $pinyin && $pinyin <= 47009 )
- {
- $zimu = “E”;
- return $zimu;
- }
- if ( 47010 <= $pinyin && $pinyin <= 47296 )
- {
- $zimu = “F”;
- return $zimu;
- }
- if ( 47297 <= $pinyin && $pinyin <= 47613 )
- {
- $zimu = “G”;
- return $zimu;
- }
- if ( 47614 <= $pinyin && $pinyin <= 48118 )
- {
- $zimu = “H”;
- return $zimu;
- }
- if ( 48119 <= $pinyin && $pinyin <= 49061 )
- {
- $zimu = “J”;
- return $zimu;
- }
- if ( 49062 <= $pinyin && $pinyin <= 49323 )
- {
- $zimu = “K”;
- return $zimu;
- }
- if ( 49324 <= $pinyin && $pinyin <= 49895 )
- {
- $zimu = “L”;
- return $zimu;
- }
- if ( 49896 <= $pinyin && $pinyin <= 50370 )
- {
- $zimu = “M”;
- return $zimu;
- }
- if ( 50371 <= $pinyin && $pinyin <= 50613 )
- {
- $zimu = “N”;
- return $zimu;
- }
- if ( 50614 <= $pinyin && $pinyin <= 50621 )
- {
- $zimu = “O”;
- return $zimu;
- }
- if ( 50622 <= $pinyin && $pinyin <= 50905 )
- {
- $zimu = “P”;
- return $zimu;
- }
- if ( 50906 <= $pinyin && $pinyin <= 51386 )
- {
- $zimu = “Q”;
- return $zimu;
- }
- if ( 51387 <= $pinyin && $pinyin <= 51445 )
- {
- $zimu = “R”;
- return $zimu;
- }
- if ( 51446 <= $pinyin && $pinyin <= 52217 )
- {
- $zimu = “S”;
- return $zimu;
- }
- if ( 52218 <= $pinyin && $pinyin <= 52697 )
- {
- $zimu = “T”;
- return $zimu;
- }
- if ( 52698 <= $pinyin && $pinyin <= 52979 )
- {
- $zimu = “W”;
- return $zimu;
- }
- if ( 52980 <= $pinyin && $pinyin <= 53640 )
- {
- $zimu = “X”;
- return $zimu;
- }
- if ( 53689 <= $pinyin && $pinyin <= 54480 )
- {
- $zimu = “Y”;
- return $zimu;
- }
- if ( 54481 <= $pinyin && $pinyin <= 62289 )
- {
- $zimu = “Z”;
- return $zimu;
- }
- $zimu = $py_key;
- return $zimu;
- }
- function pys( $pysa )
- {
- $pyi = “”;
- $i= 0;
- for ( ; $i < strlen( $pysa ); $i++)
- {
- $_obfuscate_8w= ord( substr( $pysa,$i,1) );
- if ( 160 < $_obfuscate_8w)
- {
- $_obfuscate_Bw = ord( substr( $pysa, $i++, 1 ) );
- $_obfuscate_8w = $_obfuscate_8w * 256 + $_obfuscate_Bw – 65536;
- }
- $pyi.= $_obfuscate_8w;
- }
- return $pyi;
- }
- $letter = pykey(“中华人民共和国”);
- echo $letter;
- ?>
-
从discuz里面拿来的东东[转phpx]
加解密函数 $encode = authocode(‘我要加密’,‘ENCODE’); $decode = authocode(‘我要解密’,‘DECODE’);
$auth_key = 34577 ; //密钥
function authcode($string, $operation, $key = ”) { $key = md5($key ? $key : $GLOBALS[‘auth_key’]);
$key_length = strlen($key); $string = $operation == ‘DECODE’ ? base64_decode($string) : substr(md5($string.$key), 0, 8).$string;
$string_length = strlen($string); $rndkey = $box = array();
$result = ”; for($i = 0; $i <= 255; $i++) {
$rndkey[$i] = ord($key[$i % $key_length]);
$box[$i] = $i;
} for($j = $i = 0; $i < 256; $i++) {
$j = ($j + $box[$i] + $rndkey[$i]) % 256;
$tmp = $box[$i];
$box[$i] = $box[$j];
$box[$j] = $tmp;
} for($a = $j = $i = 0; $i < $string_length; $i++) {
$a = ($a + 1) % 256;
$j = ($j + $box[$a]) % 256;
$tmp = $box[$a];
$box[$a] = $box[$j];
$box[$j] = $tmp;
$result .= chr(ord($string[$i]) ^ ($box[($box[$a] + $box[$j]) % 256]));
} if($operation == ‘DECODE’) {
if(substr($result, 0, 8) == substr(md5(substr($result, 8).$key), 0, 8)) {
return substr($result, 8);
} else {
return ”;
}
} else {
return str_replace(‘=’, ”, base64_encode($result));
} } ?>字符串截取函数 $cutstr = cutstr(‘截取我,hahahahahaaha’,‘3’); function cutstr($string, $length, $dot = ‘ …’) {
global $charset; if(strlen($string) <= $length) {
return $string;
} $string = str_replace(array(‘&’, ‘"’, ‘<‘, ‘>’), array(‘&’, ‘”‘, ‘<', ‘>’), $string); $strcut = ”;
if(strtolower($charset) == ‘utf-8’) { $n = $tn = $noc = 0;
while($n < strlen($string)) { $t = ord($string[$n]);
if($t == 9 || $t == 10 || (32 <= $t && $t <= 126)) {
$tn = 1; $n++; $noc++;
} elseif(194 <= $t && $t <= 223) {
$tn = 2; $n += 2; $noc += 2;
} elseif(224 <= $t && $t < 239) {
$tn = 3; $n += 3; $noc += 2;
} elseif(240 <= $t && $t <= 247) {
$tn = 4; $n += 4; $noc += 2;
} elseif(248 <= $t && $t <= 251) {
$tn = 5; $n += 5; $noc += 2;
} elseif($t == 252 || $t == 253) {
$tn = 6; $n += 6; $noc += 2;
} else {
$n++;
} if($noc >= $length) {
break;
} }
if($noc > $length) {
$n -= $tn;
} $strcut = substr($string, 0, $n); } else {
for($i = 0; $i < $length – strlen($dot) – 1; $i++) {
$strcut .= ord($string[$i]) > 127 ? $string[$i].$string[++$i] : $string[$i];
}
} $strcut = str_replace(array(‘&’, ‘”‘, ‘<', ‘>’), array(‘&’, ‘"’, ‘<‘, ‘>’), $strcut); return $strcut.$dot;
}
function daddslashes($string, $force = 0) {
!defined(‘MAGIC_QUOTES_GPC’) && define(‘MAGIC_QUOTES_GPC’, get_magic_quotes_gpc());
if(!MAGIC_QUOTES_GPC || $force) {
if(is_array($string)) {
foreach($string as $key => $val) {
$string[$key] = daddslashes($val, $force);
}
} else {
$string = addslashes($string);
}
}
return $string;
}
?>function random($length, $numeric = 0) {
PHP_VERSION < ‘4.2.0’ && mt_srand((double)microtime() * 1000000);
if($numeric) {
$hash = sprintf(‘%0’.$length.‘d’, mt_rand(0, pow(10, $length) – 1));
} else {
$hash = ”;
$chars = ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz’;
$max = strlen($chars) – 1;
for($i = 0; $i < $length; $i++) {
$hash .= $chars[mt_rand(0, $max)];
}
}
return $hash;
}
?>// discuz 一个ip转换地址的函数 wry.dat 是ip数据库 可以从纯真网下载最新的 [url]http://www.cz88.net/[/url] function convertip($ip) {]]>
if(!preg_match(“/^d{1,3}.d{1,3}.d{1,3}.d{1,3}$/”, $ip)) {
return ”;
} if($fd = @fopen(DISCUZ_ROOT.‘./ipdata/wry.dat’, ‘rb’)) { $ip = explode(‘.’, $ip);
$ipNum = $ip[0] * 16777216 + $ip[1] * 65536 + $ip[2] * 256 + $ip[3]; $DataBegin = fread($fd, 4);
$DataEnd = fread($fd, 4);
$ipbegin = implode(”, unpack(‘L’, $DataBegin));
if($ipbegin < 0) $ipbegin += pow(2, 32);
$ipend = implode(”, unpack(‘L’, $DataEnd));
if($ipend < 0) $ipend += pow(2, 32);
$ipAllNum = ($ipend – $ipbegin) / 7 + 1; $BeginNum = 0;
$EndNum = $ipAllNum; while($ip1num > $ipNum || $ip2num < $ipNum) {
$Middle= intval(($EndNum + $BeginNum) / 2); fseek($fd, $ipbegin + 7 * $Middle);
$ipData1 = fread($fd, 4);
if(strlen($ipData1) < 4) {
fclose($fd);
return ‘System Error’;
}
$ip1num = implode(”, unpack(‘L’, $ipData1));
if($ip1num < 0) $ip1num += pow(2, 32); if($ip1num > $ipNum) {
$EndNum = $Middle;
continue;
} $DataSeek = fread($fd, 3);
if(strlen($DataSeek) < 3) {
fclose($fd);
return ‘System Error’;
}
$DataSeek = implode(”, unpack(‘L’, $DataSeek.chr(0)));
fseek($fd, $DataSeek);
$ipData2 = fread($fd, 4);
if(strlen($ipData2) < 4) {
fclose($fd);
return ‘System Error’;
}
$ip2num = implode(”, unpack(‘L’, $ipData2));
if($ip2num < 0) $ip2num += pow(2, 32); if($ip2num < $ipNum) {
if($Middle == $BeginNum) {
fclose($fd);
return ‘Unknown’;
}
$BeginNum = $Middle;
}
} $ipFlag = fread($fd, 1);
if($ipFlag == chr(1)) {
$ipSeek = fread($fd, 3);
if(strlen($ipSeek) < 3) {
fclose($fd);
return ‘System Error’;
}
$ipSeek = implode(”, unpack(‘L’, $ipSeek.chr(0)));
fseek($fd, $ipSeek);
$ipFlag = fread($fd, 1);
} if($ipFlag == chr(2)) {
$AddrSeek = fread($fd, 3);
if(strlen($AddrSeek) < 3) {
fclose($fd);
return ‘System Error’;
}
$ipFlag = fread($fd, 1);
if($ipFlag == chr(2)) {
$AddrSeek2 = fread($fd, 3);
if(strlen($AddrSeek2) < 3) {
fclose($fd);
return ‘System Error’;
}
$AddrSeek2 = implode(”, unpack(‘L’, $AddrSeek2.chr(0)));
fseek($fd, $AddrSeek2);
} else {
fseek($fd, –1, SEEK_CUR);
} while(($char = fread($fd, 1)) != chr(0))
$ipAddr2 .= $char; $AddrSeek = implode(”, unpack(‘L’, $AddrSeek.chr(0)));
fseek($fd, $AddrSeek); while(($char = fread($fd, 1)) != chr(0))
$ipAddr1 .= $char;
} else {
fseek($fd, –1, SEEK_CUR);
while(($char = fread($fd, 1)) != chr(0))
$ipAddr1 .= $char; $ipFlag = fread($fd, 1);
if($ipFlag == chr(2)) {
$AddrSeek2 = fread($fd, 3);
if(strlen($AddrSeek2) < 3) {
fclose($fd);
return ‘System Error’;
}
$AddrSeek2 = implode(”, unpack(‘L’, $AddrSeek2.chr(0)));
fseek($fd, $AddrSeek2);
} else {
fseek($fd, –1, SEEK_CUR);
}
while(($char = fread($fd, 1)) != chr(0))
$ipAddr2 .= $char;
}
fclose($fd); if(preg_match(‘/http/i’, $ipAddr2)) {
$ipAddr2 = ”;
}
$ipaddr = “$ipAddr1 $ipAddr2”;
$ipaddr = preg_replace(‘/CZ88.NET/is’, ”, $ipaddr);
$ipaddr = preg_replace(‘/^s*/is’, ”, $ipaddr);
$ipaddr = preg_replace(‘/s*$/is’, ”, $ipaddr);
if(preg_match(‘/http/i’, $ipaddr) || $ipaddr == ”) {
$ipaddr = ‘Unknown’;
} return $ipaddr; } else { $datadir = DISCUZ_ROOT.‘./ipdata/’;
$ip_detail = explode(‘.’, $ip);
if(file_exists($datadir.$ip_detail[0].‘.txt’)) {
$ip_fdata = @fopen($datadir.$ip_detail[0].‘.txt’, ‘r’);
} else {
if(!($ip_fdata = @fopen($datadir.‘0.txt’, ‘r’))) {
return ‘Invalid IP data file’;
}
}
for ($i = 0; $i <= 3; $i++) {
$ip_detail[$i] = sprintf(‘%03d’, $ip_detail[$i]);
}
$ip = join(‘.’, $ip_detail);
do {
$ip_data = fgets($ip_fdata, 200);
$ip_data_detail = explode(‘|’, $ip_data);
if($ip >= $ip_data_detail[0] && $ip <= $ip_data_detail[1]) {
fclose($ip_fdata);
return $ip_data_detail[2].$ip_data_detail[3];
}
} while(!feof($ip_fdata));
fclose($ip_fdata);
return ‘UNKNOWN’; } }
?>