Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

孙龙 / note-library

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit fd95f0c2 authored 4 years ago by 孙龙's avatar 孙龙
Browse files
Options
  • _('Browse Files')
  • Download
  • Email Patches
  • Plain Diff

up

parent 8a282fb5
Expand all Hide whitespace changes
Inline Side-by-side
Showing with 91 additions and 0 deletions
  • vendor/sunra/php-simple-html-dom-parser/README.md
  • vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/HtmlDomParser.php
  • vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php
  • vendor/sunra/php-simple-html-dom-parser/composer.json
vendor/sunra/php-simple-html-dom-parser/README.md 0 → 100644
View file @ fd95f0c2
php-simple-html-dom-parser
==========================
Version 1.5.2
Adaptation for Composer and PSR-0 of:
A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way!
Require PHP 5+.
Supports invalid HTML.
Find tags on an HTML page with selectors just like jQuery.
Extract contents from HTML in a single line.
http://simplehtmldom.sourceforge.net/
Install
-------
composer.phar
```json
"require": {
"sunra/php-simple-html-dom-parser": "1.5.2"
}
```
Usage
-----
```php
use Sunra\PhpSimple\HtmlDomParser;
...
$dom = HtmlDomParser::str_get_html( $str );
or
$dom = HtmlDomParser::file_get_html( $file_name );
$elems = $dom->find($elem_name);
...
```
This diff is collapsed. Click to expand it.
vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/HtmlDomParser.php 0 → 100644
View file @ fd95f0c2
<?php
namespace Sunra\PhpSimple;
require 'simplehtmldom_1_5'.DIRECTORY_SEPARATOR.'simple_html_dom.php';
class HtmlDomParser {
/**
* @return \simplehtmldom_1_5\simple_html_dom
*/
static public function file_get_html() {
return call_user_func_array ( '\simplehtmldom_1_5\file_get_html' , func_get_args() );
}
/**
* get html dom from string
* @return \simplehtmldom_1_5\simple_html_dom
*/
static public function str_get_html() {
return call_user_func_array ( '\simplehtmldom_1_5\str_get_html' , func_get_args() );
}
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php 0 → 100644
View file @ fd95f0c2
This diff is collapsed. Click to expand it.
vendor/sunra/php-simple-html-dom-parser/composer.json 0 → 100644
View file @ fd95f0c2
{
"name": "sunra/php-simple-html-dom-parser",
"type": "library",
"description": "Composer adaptation of: A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Require PHP 5+. Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.",
"keywords": ["html", "dom", "parser"],
"homepage": "https://github.com/sunra/php-simple-html-dom-parser",
"license": "MIT",
"authors": [
{
"name": "S.C. Chen",
"homepage": "http://sourceforge.net/projects/simplehtmldom/"
},
{
"name": "Sunra",
"email": "sunra@yandex.ru",
"homepage": "https://github.com/sunra"
}
],
"require": {
"php": ">=5.3.2",
"ext-mbstring": "*"
},
"autoload": {
"psr-0": { "Sunra\\PhpSimple\\HtmlDomParser": "Src/" }
}
}
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment