<?php
/**
* Website: http://sourceforge.net/projects/simplehtmldom/
* Acknowledge: Jose Solorzano (https://sourceforge.net/projects/php-html/)
* Contributions by:
* Yousuke Kumakura (Attribute filters)
* Vadim Voituk (Negative indexes supports of "find" method)
* Antcs (Constructor with automatically load contents either text or file/url)
*
* all affected sections have comments starting with "PaperG"
*
* Paperg - Added case insensitive testing of the value of the selector.
* Paperg - Added tag_start for the starting index of tags - NOTE: This works but not accurately.
* This tag_start gets counted AFTER \r\n have been crushed out, and after the remove_noice calls so it will not reflect the REAL position of the tag in the source,
* it will almost always be smaller by some amount.
* We use this to determine how far into the file the tag in question is. This "percentage will never be accurate as the $dom->size is the "real" number of bytes the dom was created from.
* but for most purposes, it's a really good estimation.
* Paperg - Added the forceTagsClosed to the dom constructor. Forcing tags closed is great for malformed html, but it CAN lead to parsing errors.
* Allow the user to tell us how much they trust the html.
* Paperg add the text and plaintext to the selectors for the find syntax. plaintext implies text in the innertext of a node. text implies that the tag is a text node.
* This allows for us to find tags based on the text they contain.
* Create find_ancestor_tag to see if a tag is - at any level - inside of another specific tag.
* Paperg: added parse_charset so that we know about the character set of the source document.
* NOTE: If the user's system has a routine called get_last_retrieve_url_contents_content_type availalbe, we will assume it's returning the content-type header from the
* last transfer or curl_exec, and we will parse that and use it in preference to any other method of charset detection.
*
* Found infinite loop in the case of broken html in restore_noise. Rewrote to protect from that.
* PaperG (John Schlick) Added get_display_size for "IMG" tags.
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @author S.C. Chen <me578022@gmail.com>
* @author John Schlick
* @author Rus Carroll
* @version 1.5 ($Rev: 196 $)
* @package PlaceLocalInclude
* @subpackage simple_html_dom
*/
/**
* All of the Defines for the classes below.
* @author S.C. Chen <me578022@gmail.com>
*/
define('HDOM_TYPE_ELEMENT', 1);
define('HDOM_TYPE_COMMENT', 2);
define('HDOM_TYPE_TEXT', 3);
define('HDOM_TYPE_ENDTAG', 4);
define('HDOM_TYPE_ROOT', 5);
define('HDOM_TYPE_UNKNOWN', 6);
define('HDOM_QUOTE_DOUBLE', 0);
define('HDOM_QUOTE_SINGLE', 1);
define('HDOM_QUOTE_NO', 3);
define('HDOM_INFO_BEGIN', 0);
define('HDOM_INFO_END', 1);
define('HDOM_INFO_QUOTE', 2);
define('HDOM_INFO_SPACE', 3);
define('HDOM_INFO_TEXT', 4);
define('HDOM_INFO_INNER', 5);
define('HDOM_INFO_OUTER', 6);
define('HDOM_INFO_ENDSPACE',7);
define('DEFAULT_TARGET_CHARSET', 'UTF-8');
define('DEFAULT_BR_TEXT', "\r\n");
define('DEFAULT_SPAN_TEXT', " ");
if (!defined('MAX_FILE_SIZE')) {
define('MAX_FILE_SIZE', 600000);
}
// helper functions
// -----------------------------------------------------------------------------
// get html dom from file
// $maxlen is defined in the code as PHP_STREAM_COPY_ALL which is defined as -1.
function file_get_html($url, $use_include_path = false, $context=null, $offset = -1, $maxLen=-1, $lowercase = true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)
{
// We DO force the tags to be terminated.
$dom = new simple_html_dom(null, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText, $defaultSpanText);
do {
$repeat = false;
if ($context!==NULL)
{
// Test if "Accept-Encoding: gzip" has been set in $context
$params = stream_context_get_params($context);
if (isset($params['options']['http']['header']) && preg_match('/gzip/', $params['options']['http']['header']) !== false)
{
$contents = file_get_contents('compress.zlib://'.$url, $use_include_path, $context, $offset);
}
else
{
$contents = file_get_contents($url, $use_include_path, $context, $offset);
}
}
else
{
$contents = file_get_contents($url, $use_include_path, NULL, $offset);
}
// test if the URL doesn't return a 200 status
if (isset($http_response_header) && strpos($http_response_header[0], '200') === false) {
// has a 301 redirect header been sent?
$pattern = "/^Location:\s*(.*)$/i";
$location_headers = preg_grep($pattern, $http_response_header);
if (!empty($location_headers) && preg_match($pattern, array_values($location_headers)[0], $matches)) {
// set the URL to that returned via the redirect header and repeat this loop
$url = $matches[1];
$repeat = true;
}
}
} while ($repeat);
// stop processing if the header isn't a good responce
if (isset($http_response_header) && strpos($http_response_header[0], '200') === false)
{
return false;
}
// stop processing if the contents are too big
if (empty($contents) || strlen($contents) > MAX_FILE_SIZE)
{
return false;
}
// The second parameter can force the selectors to all be lowercase.
$dom->load($contents, $lowercase, $stripRN);
return $dom;
}
// get html dom from string
function str_get_html($str, $lowercase=true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)
{
$dom = new simple_html_dom(null, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText, $defaultSpanText);
if (empty($str) || strlen($str) > MAX_FILE_SIZE)
{
$dom->clear();
return false;
}
$dom->load($str, $lowercase, $stripRN);
return $dom;
}
// dump html dom tree
function dump_html_tree($node, $show_attr=true, $deep=0)
{
$node->dump($node);
}
/**
* simple html dom node
* PaperG - added ability for "find" routine to lowercase the value of the selector.
* PaperG - added $tag_start to track the start position of the tag in the total byte index
*
* @package PlaceLocalInclude
*/
class simple_html_dom_node
{
public $nodetype = HDOM_TYPE_TEXT;
public $tag = 'text';
public $attr = array();
public $children = array();
public $nodes = array();
public $parent = null;
// The "info" array - see HDOM_INFO_... for what each element contains.
public $_ = array();
public $tag_start = 0;
private $dom = null;
function __construct($dom)
{
$this->dom = $dom;
$dom->nodes[] = $this;
}
function __destruct()
{
$this->clear();
}
function __toString()
{
return $this->outertext();
}
// clean up memory due to php5 circular references memory leak...
function clear()
{
$this->dom = null;
$this->nodes = null;
$this->parent = null;
$this->children = null;
}
// dump node's tree
function dump($show_attr=true, $deep=0)
{
$lead = str_repeat(' ', $deep);
echo $lead.$this->tag;
if ($show_attr && count($this->attr)>0)
{
echo '(';
foreach ($this->attr as $k=>$v)
echo "[$k]=>\"".$this->$k.'", ';
echo ')';
}
echo "\n";
if ($this->nodes)
{
foreach ($this->nodes as $c)
{
$c->dump($show_attr, $deep+1);
}
}
}
// Debugging function to dump a single dom node with a bunch of information about it.
function dump_node($echo=true)
{
$string = $this->tag;
if (count($this->attr)>0)
{
$s
没有合适的资源?快使用搜索试试~ 我知道了~
兔子影视网站源码v1.3.6.5
共917个文件
php:225个
js:179个
gif:155个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 2 下载量 182 浏览量
2022-07-12
11:21:59
上传
评论 3
收藏 9.02MB ZIP 举报
温馨提示
源码介绍: 一款基于freekan影视系统二次开发的影视网站源码,增加会员系统,卡密系统,会员分组系统,自带解析接口,整体来说不错!安装界面无线跳转检查伪静态文件PHP版本建议5.4至5.6!播放页面排版错误请检查后台域名是否正确,注意域名末尾要加/反斜杠! 安装说明: 一、平台需求IIS/Apache/Nginx PHP5.2 PHP5.3 PHP5.4 MySQL5 二、程序安装使用 1.下载程序解压到本地目录; 2.上传程序到网站根目录 3.运行http://你的域名/install/index.php进行安装 4.默认后台http://你的域名/admin 5.后台用户名admin 密码admin
资源推荐
资源详情
资源评论
收起资源包目录
兔子影视网站源码v1.3.6.5 (917个子文件)
042b109bfaf69c8e2468f8be129a50b5 11KB
053952e3f589175cbdd32bc6ff71485a 13KB
0c393943a393d10ae65ce2cc711e0f97 13KB
0d6ec2db6e9d6b0f7a09093ae57de97d 11KB
1a0ace8b76532a1dbf7cf55e0a6b145c 10KB
1bdd7beb5dd54919ace8e6fade84c3f3 11KB
21b8b48e889bbb869f69710e925cd8f2 11KB
23133a90cc527c028fdbf389043ad4c5 11KB
2fe5e2620b63a8ac10c5401a492ba842 12KB
30c30a8fdac7e4bb815ac61919513e3f 10KB
37243e84c0e52e9ab6e122a833aca698 12KB
40234e5b55231d589017c38b92061c27 13KB
4181e6bb40662d3e780ad95e619836a0 13KB
4181e6bb40662d3e780ad95e619836a0 13KB
4534934675c254075c6712fc665bd4ba 10KB
4534934675c254075c6712fc665bd4ba 10KB
45ce2e2c0cca074dcd30ddcdaadd47e4 13KB
46893d42ddd85a3d314733085b36384a 11KB
47f79e9b05888a88dac3e095ae6455f5 11KB
5bb8f7daa49c029836850d4fafaa306e 10KB
5c61708a5887622acf2ab653ffb40e9e 13KB
5dee8173596acad8792da9547b743a29 10KB
5f990af9a3535d4b83f22f2216c72203 10KB
5fa154417b07100b48cc1e6875dff06f 13KB
6022567c89fbd23bf2c4ab40667ceeec 11KB
626fae7e5557fe5af55249b7f529ba53 10KB
722ea31ce96a262e7b82959abb1e6d7b 12KB
76037798a04af20077bf5039c5bdca8a 11KB
7787a4c65ccef9c0dae3ee106cb3809d 13KB
7787a4c65ccef9c0dae3ee106cb3809d 13KB
7c06f34316b3ce17a39a612b26a1399a 3KB
7ce1d949a8038d3afeadd6136bea7ba6 13KB
7cf7b4b70a34cc89b0ad52635aaec809 11KB
7cf7b4b70a34cc89b0ad52635aaec809 11KB
7e304770734266229bb7dd842e683d01 9KB
81e8a6a835d03675c7005e9277a14679 13KB
903198b3338db5ce97192f5987a241f8 12KB
95e9dc67272b20ad6f2b44afd65c6837 11KB
9df07fbab50a283abd38c066c02df43f 11KB
a9ae0c745a047656b4ac2553d21d4323 3KB
b25a766a9b532bfcaddc72b209f15956 12KB
b33803f8a5b48194dd37c1ade5126a58 14KB
b6afdb924f8d56eba7c59791f9e1c823 12KB
b7a0c9a8be596190e962a95b6d22bb96 10KB
b7a0c9a8be596190e962a95b6d22bb96 10KB
bfd1f0af0e1cb5778e4be8825d22ea0c 11KB
c1b7e760ab937c9194890c3541068fd1 13KB
cacc6e3ff19826845afad97132e9cc61 10KB
cacc6e3ff19826845afad97132e9cc61 10KB
cc2eb6984265dd3d29ec81960bd0b162 12KB
nginx.conf 201B
web.config 1KB
main.css 282KB
common.min.css 245KB
weuix.min.css 190KB
summernote-bs3.css 149KB
bootstrap.min.css 135KB
bootstrap.css 134KB
style.css 112KB
bootstrap.min.css 111KB
bootstrap.min.css 107KB
ui.css 83KB
style.css 67KB
add-ons.min.css 52KB
common.css 51KB
style.min.css 46KB
datepicker3.css 34KB
play.css 32KB
font-awesome.min.css 31KB
theme.css 30KB
bootkit.css 29KB
jquery-ui-1.10.4.min.css 27KB
stui_block.css 26KB
li.css 26KB
jquery-ui-1.10.4.custom.css 24KB
default.css 21KB
bootstrap-editable.css 21KB
font-awesome.min.css 20KB
iconfont.css 19KB
li1.css 18KB
swiper.min.css 17KB
swiper.min.css 17KB
mCustomScrollbar.css 17KB
video.css 17KB
swiper.min.css 16KB
mCustomScrollbar.css 14KB
stui_default.css 14KB
style.css 13KB
fullcalendar.css 12KB
index.css 12KB
dropzone.css 12KB
login.css 11KB
movie.css 10KB
dongman.css 10KB
tv.css 10KB
es-icon.css 9KB
css.css 9KB
jquery.mmenu.css 8KB
summernote.css 8KB
blackcolor4.css 8KB
共 917 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
- weixin_407194752023-07-02感谢大佬,让我及时解决了当下的问题,解燃眉之急,必须支持!
- miss2024-04-12非常有用的资源,有一定的参考价值,受益匪浅,值得下载。
智慧浩海
- 粉丝: 1w+
- 资源: 5113
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功