易截截图软件、单文件、免安装、纯绿色、仅160KB

100分求救:懂php和.net帮忙翻译下个函数

PHP code:
function _authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {
$ckey_length = 4;

$key = md5($key ? $key : UC_KEY);
$keya = md5(substr($key, 0, 16));
$keyb = md5(substr($key, 16, 16));
$keyc = $ckey_length ? ($operation == 'DECODE' ? substr($string, 0, $ckey_length): substr(md5(microtime()), -$ckey_length)) : '';

$cryptkey = $keya.md5($keya.$keyc);
$key_length = strlen($cryptkey);

$string = $operation == 'DECODE' ? base64_decode(substr($string, $ckey_length)) : sprintf('%010d', $expiry ? $expiry + time() : 0).substr(md5($string.$keyb), 0, 16).$string;
$string_length = strlen($string);

$result = '';
$box = range(0, 255);

$rndkey = array();
for($i = 0; $i <= 255; $i++) {
$rndkey[$i] = ord($cryptkey[$i % $key_length]);
}

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($r


相关问答:

北京急招linux、PHP网络应用开发

我们隶属中科院计算所网络重点实验室(http://www.ict.ac.cn/survey/channel/detail443.asp)基础设施课题组.
现因项目和业务拓展的需要,特需要招聘与项目相关的网络应用工程师1-2名。

具体要求如下。有意者 ......

php 上传视频的问题,在线等

现有一个 avi 格式的视频,
想在一个页面中加一个上传视频的功能,把这个avi的文件上传上去,并可在网页中点击查视频,这怎么实现呀,
自己去找一个普通的上传代码就可以了。

至于查看视频,你指的是在线 ......

php中file_get_contents问题

$a = $_FILES['userfile']['name'] ;

$test = $a;

$p = split('/',$test);

$p[count($p)-1];

$content = file_get_contents("$p");

$con ......

关于php递归删除目录问题

PHP code:

function delDirAndFile( $dirName )
{
if ( $handle = opendir( "$dirName" ) ) {
while ( false !== ( $item = readdir( $handle ) ) ) {
if ( $item != &qu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号