600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > php读取torrent种子文件内容办法(测试可用)

php读取torrent种子文件内容办法(测试可用)

时间:2018-09-27 02:34:02

相关推荐

php读取torrent种子文件内容办法(测试可用)

php教程|php手册

php,torrent,种子文件,

php教程-php手册

php读取torrent种子文件内容的方法(测试可用),

仿乐尚源码出售,ubuntu 设置工作区,怎么查tomcat装在哪里,水爬虫图片大全,php 剔除字符串指定字符,上海杨浦seolzw

stack, array($this->y, $this->z, $this->m, $this->n, $this->stat)); list($this->y, $this->z, $this->m, $this->n, $this->stat) = array($newY, 0, 0, 0, $newStat); } /** * This method restore the saved status of current * encode/decode work. */ protected function pop() { $t = array_pop($this->stack); if ($t) {if ($t[4] == self::READ_DICT) { $t[0]->{$t[1]} = $this->y; $t[1] = 0;} elseif ($t[4] == self::READ_LIST) $t[0][] = $this->y;list($this->y, $this->z, $this->m, $this->n, $this->stat) = $t; } } /** * This method initializes the status of work. * YOU SHOULD CALL THIS METHOD BEFORE EVERYTHING. */ public function init() { $this->stat = self::READY; $this->stack = array(); $this->z = $this->m = $this->n = 0; } /** * This method decode $s($l as length). * You can get $obj->y as the result. */ public function decode($s, $l) { $this->y = 0; for ($i = 0; $i stat) { case self::READY:if ($s[$i] == d) { $this->y = new xBDict(); $this->stat = self::READ_DICT;} elseif ($s[$i] == l) { $this->y = array(); $this->stat = self::READ_LIST;}break; case self::READ_INT:if ($s[$i] == e) { $this->y->val = substr($s, $this->m, $i - $this->m); $this->pop();}break; case self::READ_STR:if (xBInt::isNum($s[$i])) continue;if ($s[$i] = :) { $this->z = substr($s, $this->m, $i - $this->m); $this->y = substr($s, $i + 1, $this->z + 0); $i += $this->z; $this->pop();}break; case self::READ_KEY:if (xBInt::isNum($s[$i])) continue;if ($s[$i] = :) { $this->n = substr($s, $this->m, $i - $this->m); $this->z = substr($s, $i + 1, $this->n + 0); $i += $this->n; $this->stat = self::READ_DICT;}break; case self::READ_DICT:if ($s[$i] == e) { $this->pop(); break;} elseif (!$this->z) { $this->m = $i; $this->stat = self::READ_KEY; break;} case self::READ_LIST:switch ($s[$i]) { case e: $this->pop(); break; case d: $this->push(new xBDict(), self::READ_DICT); break; case i: $this->push(new xBInt(), self::READ_INT); $this->m = $i + 1; break; case l: $this->push(array(), self::READ_LIST); break; default: if (xBInt::isNum($s[$i])) {$this->push(\, self::READ_STR);$this->m = $i; }}break;} } $rtn = empty($this->stack); $this->init(); return $rtn; } /** * This method encode $obj->y into BEncode. */ public function encode() { return $this->_encDo($this->y); } protected function _encStr($str) { return strlen($str) . : . $str; } protected function _encDo($o) { if (is_string($o))return $this->_encStr($o); if ($o instanceof xBInt)return i . $o->val . e; if ($o instanceof xBDict) {$r = d;foreach ($o as $k => $c) $r .= $this->_encStr($k) . $this->_encDo($c);return $r . e; } if (is_array($o)) {$r = l;foreach ($o as $c) $r .= $this->_encDo($c);return $r . e; } }}class xBDict{}class xBInt{ public $val; public function __construct($val = 0) { $this->val = $val; } public static function isNum($chr) { $chr = ord($chr); if ($chr = 48)return true; return false; }}//使用实例$s = file_get_contents("test.torrent");$bc = new xBEncoder();$bc->init();$bc->decode($s, strlen($s));var_dump($bc->y);

《PHP数组(Array)操作技巧大全》、《PHP数学运算技巧总结》、《PHP图形与图片操作技巧汇总》、《php操作office文档技巧总结(包括word,excel,access,ppt)》、《php日期与时间用法总结》、《php面向对象程序设计入门教学》、《php字符串(string)用法总结》、《php+mysql数据库操作入门教学》及《php常见数据库操作技巧汇总》

易语言源码获取,vscode如何备注,ubuntu国内源,eclipse配置tomcat环境,c 创建sqlite,常州第一届网页设计大赛,织梦数据库工具,虚拟主机可以做服务器,wordpress seo插件,js前端验证框架,爬虫获取数据,php书籍,seo页面,指定springboot版本,js随机标签云,牛商网网站源码,js 保存网页到桌面,超市进销存设计模板,织梦后台怎么登录,js获取上个页面的地址,医院管理系统破解版,安卓特色开发的java程序代码lzw

激活卡平台源码,vscode下载网络错误,docker安装ubuntu镜像,tomcat opts,sqlite3 接口,网页设计书记,织梦网站 数据库,云服务器 负载均衡,织梦在线订单插件,前端框架使用微信,艺龙爬虫,php数组长度,门户网站seo,调试springboot,织梦循环标签,网站投稿源码,将wordpress 搭建成一个公众网页,php 网站模板,php搭建网站后台,页面上拉加载,成绩管理系统 源代码,程序中inc文件怎么制作lzw

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。