├── acadmia.php
├── remember.json
├── Apis
├── test.html
├── xxx.php
├── Remember.php
├── Apis.php
├── Dictionary.php
├── Youtube.php
├── OpenWeather.php
├── Google.php
├── Lyrics.php
├── Wikipedia.php
├── Schedule.php
├── Birthday.php
└── birthday.json
├── simplehtmldom_1_9
├── manual
│ ├── site
│ │ └── .gitkeep
│ ├── docs
│ │ ├── api
│ │ │ ├── simple_html_dom
│ │ │ │ ├── __destruct.md
│ │ │ │ ├── lastChild.md
│ │ │ │ ├── firstChild.md
│ │ │ │ ├── loadFile.md
│ │ │ │ ├── __toString.md
│ │ │ │ ├── remove_callback.md
│ │ │ │ ├── parse.md
│ │ │ │ ├── clear.md
│ │ │ │ ├── createTextNode.md
│ │ │ │ ├── load_file.md
│ │ │ │ ├── read_tag.md
│ │ │ │ ├── childNodes.md
│ │ │ │ ├── as_text_node.md
│ │ │ │ ├── getElementById.md
│ │ │ │ ├── save.md
│ │ │ │ ├── createElement.md
│ │ │ │ ├── getElementByTagName.md
│ │ │ │ ├── dump.md
│ │ │ │ ├── search_noise.md
│ │ │ │ ├── skip.md
│ │ │ │ ├── link_nodes.md
│ │ │ │ ├── getElementsById.md
│ │ │ │ ├── set_callback.md
│ │ │ │ ├── getElementsByTagName.md
│ │ │ │ ├── copy_skip.md
│ │ │ │ ├── copy_until_char.md
│ │ │ │ ├── copy_until.md
│ │ │ │ ├── restore_noise.md
│ │ │ │ ├── find.md
│ │ │ │ ├── parse_attr.md
│ │ │ │ ├── parse_charset.md
│ │ │ │ ├── prepare.md
│ │ │ │ ├── __get.md
│ │ │ │ ├── remove_noise.md
│ │ │ │ ├── load.md
│ │ │ │ ├── __construct.md
│ │ │ │ └── simple_html_dom.md
│ │ │ ├── simple_html_dom_node
│ │ │ │ ├── parentNode.md
│ │ │ │ ├── __destruct.md
│ │ │ │ ├── makeup.md
│ │ │ │ ├── __toString.md
│ │ │ │ ├── nodeName.md
│ │ │ │ ├── clear.md
│ │ │ │ ├── lastChild.md
│ │ │ │ ├── has_child.md
│ │ │ │ ├── text.md
│ │ │ │ ├── getAllAttributes.md
│ │ │ │ ├── nextSibling.md
│ │ │ │ ├── firstChild.md
│ │ │ │ ├── __unset.md
│ │ │ │ ├── hasChildNodes.md
│ │ │ │ ├── prevSibling.md
│ │ │ │ ├── xmltext.md
│ │ │ │ ├── innertext.md
│ │ │ │ ├── last_child.md
│ │ │ │ ├── outertext.md
│ │ │ │ ├── first_child.md
│ │ │ │ ├── next_sibling.md
│ │ │ │ ├── prev_sibling.md
│ │ │ │ ├── getAttribute.md
│ │ │ │ ├── getElementById.md
│ │ │ │ ├── is_utf8.md
│ │ │ │ ├── get_display_size.md
│ │ │ │ ├── getElementByTagName.md
│ │ │ │ ├── hasAttribute.md
│ │ │ │ ├── removeAttribute.md
│ │ │ │ ├── children.md
│ │ │ │ ├── setAttribute.md
│ │ │ │ ├── find_ancestor_tag.md
│ │ │ │ ├── dump_node.md
│ │ │ │ ├── parse_selector.md
│ │ │ │ ├── hasClass.md
│ │ │ │ ├── appendChild.md
│ │ │ │ ├── dump.md
│ │ │ │ ├── getElementsById.md
│ │ │ │ ├── childNodes.md
│ │ │ │ ├── __construct.md
│ │ │ │ ├── getElementsByTagName.md
│ │ │ │ ├── parent.md
│ │ │ │ ├── save.md
│ │ │ │ ├── convert_text.md
│ │ │ │ ├── match.md
│ │ │ │ ├── addClass.md
│ │ │ │ ├── __set.md
│ │ │ │ ├── seek.md
│ │ │ │ ├── remove.md
│ │ │ │ ├── removeClass.md
│ │ │ │ ├── __isset.md
│ │ │ │ ├── removeChild.md
│ │ │ │ ├── simple_html_dom_node.md
│ │ │ │ ├── __get.md
│ │ │ │ └── find.md
│ │ │ ├── constants.md
│ │ │ ├── str_get_html.md
│ │ │ ├── file_get_html.md
│ │ │ ├── api.md
│ │ │ └── definitions.md
│ │ ├── manual
│ │ │ ├── saving-dom-objects.md
│ │ │ ├── customizing-parsing-behavior.md
│ │ │ ├── creating-dom-objects.md
│ │ │ ├── traversing-dom-tree.md
│ │ │ ├── accessing-element-attributes.md
│ │ │ ├── finding-html-elements.md
│ │ │ └── adding-nodes.md
│ │ ├── requirements.md
│ │ ├── index.md
│ │ ├── faq.md
│ │ └── quick-start.md
│ ├── extra.css
│ ├── custom_theme
│ │ └── main.html
│ ├── README.md
│ └── mkdocs.yml
├── example
│ ├── example_extract_html.php
│ ├── example_modify_contents.php
│ ├── example_callback.php
│ ├── scraping
│ │ ├── example_scraping_slashdot.php
│ │ ├── example_scraping_digg.php
│ │ ├── example_scraping_imdb.php
│ │ └── example_scraping_general.php
│ ├── simple_html_dom_utility.php
│ ├── example_basic_selector.php
│ └── example_advanced_selector.php
├── phpcompatibility.xml
├── LICENSE
├── phpcs.xml
└── CHANGELOG.md
├── Bot.zip
├── Bot13.zip
├── Bot22.zip
├── Bot31.zip
├── README.md
├── jsmodules
├── soundChip.js
├── chip.js
└── text to speech.js
├── user.json
├── modules
├── randomQuery.php
└── analyzeQuery.php
├── google.php
├── category.json
├── Sample.json
├── people.json
├── statement.json
├── getLyrics.php
├── randomChats.json
├── bot1.js
├── bot.php
├── utilities.php
├── ai.json
├── index.html
├── data.json
├── schedule.json
├── academia.html
├── birthdayFormat.json
└── birthday.json
/acadmia.php:
--------------------------------------------------------------------------------
1 | plaintext;
5 | ?>
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/__destruct.md:
--------------------------------------------------------------------------------
1 | # __destruct
2 |
3 | ```php
4 | __destruct ()
5 | ```
6 |
7 | Destroys the current object and clears memory.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/extra.css:
--------------------------------------------------------------------------------
1 | code {
2 | white-space: nowrap;
3 | }
4 |
5 | .logo {
6 | display: block;
7 | margin: auto;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/lastChild.md:
--------------------------------------------------------------------------------
1 | # lastChild
2 |
3 | ```php
4 | lastChild () : object
5 | ```
6 |
7 | Returns the last child of the root element.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/parentNode.md:
--------------------------------------------------------------------------------
1 | # parentNode
2 |
3 | ```php
4 | parentNode () : object
5 | ```
6 |
7 | Returns the current's node parent.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/firstChild.md:
--------------------------------------------------------------------------------
1 | # firstChild
2 |
3 | ```php
4 | firstChild () : object
5 | ```
6 |
7 | Returns the first child of the root element.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/loadFile.md:
--------------------------------------------------------------------------------
1 | # loadFile
2 |
3 | ```php
4 | loadFile (...)
5 | ```
6 |
7 | This function is a wrapper for [`load_file`](#load_file)
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/__destruct.md:
--------------------------------------------------------------------------------
1 | # __destruct
2 |
3 | ```php
4 | __destruct ( )
5 | ```
6 |
7 | Destructs the current object and frees memory.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/makeup.md:
--------------------------------------------------------------------------------
1 | # makeup
2 |
3 | ```php
4 | makeup ( ) : string
5 | ```
6 |
7 | Returns the HTML representation of the current node.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/__toString.md:
--------------------------------------------------------------------------------
1 | # __toString
2 |
3 | ```php
4 | __toString ( ) : string
5 | ```
6 |
7 | Returns the outer text of the current node.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/nodeName.md:
--------------------------------------------------------------------------------
1 | # nodeName
2 |
3 | ```php
4 | nodeName ( ) : string
5 | ```
6 |
7 | Returns the name of the current node (tag name).
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/__toString.md:
--------------------------------------------------------------------------------
1 | # __toString
2 |
3 | ```php
4 | __toString () : string
5 | ```
6 |
7 | Returns the inner text of the root element of the DOM.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/clear.md:
--------------------------------------------------------------------------------
1 | # clear
2 |
3 | ```php
4 | clear ( )
5 | ```
6 |
7 | Sets all properties in the current node, which contain objects, to null.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/lastChild.md:
--------------------------------------------------------------------------------
1 | # lastChild
2 |
3 | ```php
4 | lastChild ( ) : object
5 | ```
6 |
7 | This is a wrapper for [`last_child`](../last_child/).
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/has_child.md:
--------------------------------------------------------------------------------
1 | # has_child
2 |
3 | ```php
4 | has_child ( ) : bool
5 | ```
6 |
7 | Returns true if the current node has one or more child nodes.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/text.md:
--------------------------------------------------------------------------------
1 | # text
2 |
3 | ```php
4 | text ( ) : string
5 | ```
6 |
7 | Returns the (HTML) text representation for the current node recursively.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/remove_callback.md:
--------------------------------------------------------------------------------
1 | # remove_callback
2 |
3 | ```php
4 | remove_callback ()
5 | ```
6 |
7 | Removes the callback set by [`set_callback`](#set_callback).
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/getAllAttributes.md:
--------------------------------------------------------------------------------
1 | # getAllAttributes
2 |
3 | ```php
4 | getAllAttributes ( ) : array
5 | ```
6 |
7 | Returns all attributes for the current node.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/nextSibling.md:
--------------------------------------------------------------------------------
1 | # nextSibling
2 |
3 | ```php
4 | nextSibling ( ) : object
5 | ```
6 |
7 | This is a wrapper for [`next_sibling`](../next_sibling/).
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/firstChild.md:
--------------------------------------------------------------------------------
1 | # firstChild
2 |
3 | ```php
4 | firstChild ( ) : mixed
5 | ```
6 |
7 | This function is a wrapper for [`first_child`](../first_child/)
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/__unset.md:
--------------------------------------------------------------------------------
1 | # __unset
2 |
3 | ```php
4 | __unset ( string $name )
5 | ```
6 |
7 | Removes the attribute with name `$name` from the current node if it exists.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/hasChildNodes.md:
--------------------------------------------------------------------------------
1 | # hasChildNodes
2 |
3 | ```php
4 | hasChildNodes ( ) : bool
5 | ```
6 |
7 | This is a wrapper function for [`has_child`](../has_child/).
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/prevSibling.md:
--------------------------------------------------------------------------------
1 | # prevSibling
2 |
3 | ```php
4 | prevSibling ( ) : object
5 | ```
6 |
7 | This is a wrapper for [`previous_sibling`](../previous_sibling/).
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/parse.md:
--------------------------------------------------------------------------------
1 | # parse (protected)
2 |
3 | ```php
4 | parse ()
5 | ```
6 |
7 | Parses the document. This function is called after the document was loaded into `$this->doc`.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/clear.md:
--------------------------------------------------------------------------------
1 | # clear
2 |
3 | ```php
4 | clear ()
5 | ```
6 |
7 | Cleans up memory to prevent [PHP 5 circular references memory leak](https://bugs.php.net/bug.php?id=33595).
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/createTextNode.md:
--------------------------------------------------------------------------------
1 | # createTextNode
2 |
3 | ```php
4 | createTextNode ( string $value ) : object
5 | ```
6 |
7 | Creates a new text element.
8 |
9 | Returns the element.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/xmltext.md:
--------------------------------------------------------------------------------
1 | # xmltext
2 |
3 | ```php
4 | xmltext ( ) : string
5 | ```
6 |
7 | Returns the xml representation for the inner text of the current node as a CDATA section.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/innertext.md:
--------------------------------------------------------------------------------
1 | # innertext
2 |
3 | ```php
4 | innertext ( ) : string
5 | ```
6 |
7 | Returns the inner text (everything inside the opening and closing tags) of the current node.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/last_child.md:
--------------------------------------------------------------------------------
1 | # last_child
2 |
3 | ```php
4 | last_child ( ) : object
5 | ```
6 |
7 | Returns the last child of the current node or null if the current node has no child elements.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/outertext.md:
--------------------------------------------------------------------------------
1 | # outertext
2 |
3 | ```php
4 | outertext ( ) : string
5 | ```
6 |
7 | Returns the outer text (everything including the opening and closing tags) of the current node.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/first_child.md:
--------------------------------------------------------------------------------
1 | # first_child
2 |
3 | ```php
4 | first_child ( ) : mixed
5 | ```
6 |
7 | Returns the first child node of the current node or null if the current nod has no child nodes.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/next_sibling.md:
--------------------------------------------------------------------------------
1 | # next_sibling
2 |
3 | ```php
4 | next_sibling ( ) : object
5 | ```
6 |
7 | Returns the next sibling of the current node or null if the current node has no next sibling.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/prev_sibling.md:
--------------------------------------------------------------------------------
1 | # prev_sibling
2 |
3 | ```php
4 | prev_sibling ( ) : object
5 | ```
6 |
7 | Returns the previous sibling of the current node, or null if the current node has no previous sibling.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/load_file.md:
--------------------------------------------------------------------------------
1 | # load_file
2 |
3 | ```php
4 | load_file (...) : object
5 | ```
6 |
7 | Loads a HTML document from file. Supports arguments of [`file_get_contents`](http://php.net/manual/en/function.file-get-contents.php).
8 |
9 | Returns the object.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/read_tag.md:
--------------------------------------------------------------------------------
1 | # read_tag (protected)
2 |
3 | ```php
4 | read_tag () : bool
5 | ```
6 |
7 | Reads a single tag starting at the current parsing position in the document. The tag is automatically added to the DOM.
8 |
9 | Returns true if a tag was found.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/getAttribute.md:
--------------------------------------------------------------------------------
1 | # getAttribute
2 |
3 | ```php
4 | getAttribute ( string $name ) : mixed
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `name` | Attribute name.
10 |
11 | Returns the value for the attribute `$name`.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/childNodes.md:
--------------------------------------------------------------------------------
1 | # childNodes
2 |
3 | ```php
4 | childNodes ( [ int $idx = -1 ] ) : mixed
5 | ```
6 |
7 | Returns children of the root element.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `idx` | Index of the child element to return.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/getElementById.md:
--------------------------------------------------------------------------------
1 | # getElementById
2 |
3 | ```php
4 | getElementById ( string $id ) : object
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `id` | Element id.
10 |
11 | Returns the first element with the specified id.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/is_utf8.md:
--------------------------------------------------------------------------------
1 | # is_utf8 (static)
2 |
3 | ```php
4 | is_utf8 ( string $str ) : bool
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `str` | String to test.
10 |
11 | Returns true if the provided string is a valid UTF-8 string.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/get_display_size.md:
--------------------------------------------------------------------------------
1 | # get_display_size
2 |
3 | ```php
4 | get_display_size ( ) : mixed
5 | ```
6 |
7 | Returns false if the current node is not an image.
8 |
9 | Returns an associative array of two elements - `height` and `width` - that represent the display size of the image.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/as_text_node.md:
--------------------------------------------------------------------------------
1 | # as_text_node (protected)
2 |
3 | ```php
4 | as_text_node ( string $tag ) : bool
5 | ```
6 |
7 | Adds a tag as text node.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `tag` | The element's tag name.
12 |
13 | Returns true on success.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/getElementByTagName.md:
--------------------------------------------------------------------------------
1 | # getElementByTagName
2 |
3 | ```php
4 | getElementByTagName ( string $name ) : object
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `name` | Tag name.
10 |
11 | Returns the first element with the specified tag name.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/custom_theme/main.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block footer %}
4 | {% include "footer.html" %}
5 |
4 |
`
7 | }
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/dump.md:
--------------------------------------------------------------------------------
1 | # dump
2 |
3 | ```php
4 | dump ( [ bool show_attr = true ] ) : string
5 | ```
6 |
7 | Dumps the entire DOM into a string. Useful for debugging purposes.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `show_attr` | Attributes are included in the dump when enabled.
12 |
13 | Returns the DOM tree as string.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/dump_node.md:
--------------------------------------------------------------------------------
1 | # dump_node
2 |
3 | ```php
4 | dump_node ( [ bool $echo = true ] ) : mixed
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `echo` | Echoes the dump details directly if enabled.
10 |
11 | Dumps information about the current document node. Returns a string if `$echo` is set to false, null otherwise.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/parse_selector.md:
--------------------------------------------------------------------------------
1 | # parse_selector (protected)
2 |
3 | ```php
4 | parse_selector ( string $selector_string ) : array
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `selector_string` | The selector string
10 |
11 | Parses a CSS selector into an internal format for further use. See also [`find`](../find/).
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/search_noise.md:
--------------------------------------------------------------------------------
1 | # search_noise (protected)
2 |
3 | ```php
4 | search_noise ( string $text ) : string
5 | ```
6 |
7 | Find a single noise element by providing the noise placeholder text.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `text` | The noise placeholder to find.
12 |
13 | Returns the original contents for the placeholder.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/hasClass.md:
--------------------------------------------------------------------------------
1 | # hasClass
2 |
3 | ```php
4 | hasClass ( string $class ) : bool
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `class` | Specifies the class name to search for.
10 |
11 | Returns true if the current node has the specified class name.
12 |
13 | **Examples**
14 |
15 | ```php
16 | $node->hasClass('article');
17 | ```
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/skip.md:
--------------------------------------------------------------------------------
1 |
2 | # skip (protected)
3 |
4 | ```php
5 | skip ( string $chars )
6 | ```
7 |
8 | Skips characters starting at the current parsing position in the document. Sets the parsing position to the first character not in the provided list of characters.
9 |
10 | | Parameter | Description
11 | | --------- | -----------
12 | | `chars` | A list of characters to skip.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/appendChild.md:
--------------------------------------------------------------------------------
1 | # appendChild
2 |
3 | ```php
4 | appendChild ( object $node ) : object
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `node` | An object of type [`simple_html_dom_node`](../simple_html_dom_node/)
10 |
11 | Makes the current node parent of the node provided to this function.
12 |
13 | Returns the provided node.
14 |
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/link_nodes.md:
--------------------------------------------------------------------------------
1 | # link_nodes (protected)
2 |
3 | ```php
4 | link_nodes ( object &$node, bool $is_child )
5 | ```
6 |
7 | Links the provided node to the DOM tree.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `node` | The node to link to the DOM tree.
12 | | `is_child` | If active, makes the node a sibling of the current node (child of parent).
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/dump.md:
--------------------------------------------------------------------------------
1 | # dump
2 |
3 | ```php
4 | dump ( [ bool $show_attr = false [, int $depth = 0 ]] )
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `show_attr` | Attribute names are included in the output if enabled.
10 | | `depth` | Depth of the current element
11 |
12 | Dumps information about the current node and all child nodes recursively.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/getElementsById.md:
--------------------------------------------------------------------------------
1 | # getElementsById
2 |
3 | ```php
4 | getElementsById ( string $id [, int $idx = null] ) : mixed
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `id` | Element id.
10 | | `idx` | Index of element to return.
11 |
12 | Returns all elements with the specified id if `$idx` is null, or a specific one if `$idx` is a valid index.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/childNodes.md:
--------------------------------------------------------------------------------
1 | # childNodes
2 |
3 | ```php
4 | childNodes ( [ int $idx = -1 ] ) : mixed
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `idx` | Index of the node to return or `-1` to return all nodes.
10 |
11 | Returns all or one specific child node from the current node.
12 |
13 | ## Remarks
14 |
15 | This function is a wrapper for [`children`](../children/)
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/getElementsById.md:
--------------------------------------------------------------------------------
1 | # getElementsById
2 |
3 | ```php
4 | getElementsById ( string $id [, int $idx = null ] ) : object
5 | ```
6 |
7 | Searches elements by id.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `id` | ID of the element to find.
12 | | `idx` | Returns the element at the specified index if defined.
13 |
14 | Returns the element(s) or null if no match was found.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/__construct.md:
--------------------------------------------------------------------------------
1 | # __construct
2 |
3 | ```php
4 | __construct ( [ object $dom ] ) : object
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `dom` | An object of type [`simple_html_dom`](api/simple_html_dom/).
10 |
11 | Constructs a new object of type `simple_html_dom_node`, assignes `$dom` as DOM object and adds itself to the list of nodes in `$dom`.
12 |
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/set_callback.md:
--------------------------------------------------------------------------------
1 | # set_callback
2 |
3 | ```php
4 | set_callback ( string $function_name )
5 | ```
6 |
7 | Sets the callback function which is called on each element of the DOM when building outertext.
8 | The function must accept a single parameter of type `simple_html_dom_node`.
9 |
10 | | Parameter | Description
11 | | --------- | -----------
12 | | `function_name` | Name of the function.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/getElementsByTagName.md:
--------------------------------------------------------------------------------
1 | # getElementsByTagName
2 |
3 | ```php
4 | getElementsByTagName ( string $name [, int $idx = null ] ) : mixed
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `name` | Tag name.
10 | | `idx` | Index of the element to return.
11 |
12 | Returns all elements with the specified tag name if `$idx` is null, or a specific one if `$idx` is a valid index.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/getElementsByTagName.md:
--------------------------------------------------------------------------------
1 | # getElementsByTagName
2 |
3 | ```php
4 | getElementsByTagName ( string $name [, int $idx = -1 ] ) : object
5 | ```
6 |
7 | Searches elements by tag name.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `name` | Tag name of the element to find.
12 | | `idx` | Returns the element at the specified index.
13 |
14 | Returns the element(s) or null if no match was found.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/copy_skip.md:
--------------------------------------------------------------------------------
1 | # copy_skip (protected)
2 |
3 | ```php
4 | copy_skip ( string $chars ) : string
5 | ```
6 |
7 | Skips characters starting at the current parsing position in the document. Sets the parsing position to the first character not in the provided list of characters.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `chars` | A list of characters to skip.
12 |
13 | Returns the skipped characters.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/manual/saving-dom-objects.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Saving DOM objects
3 | ---
4 |
5 | # Functional
6 |
7 | ```php
8 | // Dumps the internal DOM tree back into string
9 | $str = $html;
10 |
11 | // Print it!
12 | echo $html;
13 | ```
14 |
15 | # Object Oriented
16 |
17 | ```php
18 | // Dumps the internal DOM tree back into string
19 | $str = $html->save();
20 |
21 | // Dumps the internal DOM tree back into a file
22 | $html->save('result.htm');
23 | ```
--------------------------------------------------------------------------------
/simplehtmldom_1_9/example/example_modify_contents.php:
--------------------------------------------------------------------------------
1 | find('img') as $e)
10 | $e->outertext = '';
11 |
12 | // replace all input
13 | foreach($html->find('input') as $e)
14 | $e->outertext = '[INPUT]';
15 |
16 | // dump contents
17 | echo $html;
18 | ?>
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/parent.md:
--------------------------------------------------------------------------------
1 | # parent
2 |
3 | ```php
4 | parent ( [ object $parent = null ] ) : object
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `parent` | The parent node
10 |
11 | * Returns the parent node of the current node if `$parent` is null.
12 | * Sets the parent node of the current node if `$parent` is not null. In this case the current node is automatically added to the list of nodes in the parent node.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/save.md:
--------------------------------------------------------------------------------
1 | # save
2 |
3 | ```php
4 | save ( [ string $filepath = '' ] ) : string
5 | ```
6 |
7 | Writes the current node to file.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `filepath` | Writes to file if the provided file path is not empty.
12 |
13 | Returns the document string.
14 |
15 | **Examples**
16 |
17 | ```php
18 | $string = $node->save();
19 | $string = $node->save($file);
20 | ```
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/copy_until_char.md:
--------------------------------------------------------------------------------
1 | # copy_until_char (protected)
2 |
3 | ```php
4 | copy_until ( string $char ) : string
5 | ```
6 |
7 | Copies all characters starting at the current parsing position in the document. Sets the parsing position to the first character that matches the provided character.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `char` | A character to stop copying at.
12 |
13 | Returns the copied characters.
--------------------------------------------------------------------------------
/user.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Hi, Raghav",
3 | "height": "I know you're 170cm tall",
4 | "weight": "You are 61 kilograms",
5 | "nationality": "Indian",
6 | "college": "You study in SRM Chennai",
7 | "euphoria": "I won't tell",
8 | "girlfriend": "Noone can see her. By the way you don't need any girl, you have me",
9 | "phone number": "It's 6387658003",
10 | "email": "It's raghavseries572@gmail.com",
11 | "birthplace": "You're mother told me that you were born in Lucknow{|🙂|}"
12 | }
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/copy_until.md:
--------------------------------------------------------------------------------
1 | # copy_until (protected)
2 |
3 | ```php
4 | copy_until ( string $chars ) : string
5 | ```
6 |
7 | Copies all characters starting at the current parsing position in the document. Sets the parsing position to the first character that matches any of the characters in the provided list of characters.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `chars` | A list of characters to stop copying at.
12 |
13 | Returns the copied characters.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/restore_noise.md:
--------------------------------------------------------------------------------
1 | # restore_noise (protected)
2 |
3 | ```php
4 | restore_noise ( string $text ) : string
5 | ```
6 |
7 | Restores noise in the provided string by replacing noise placeholders by their original contents.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `text` | A string (potentially) containing noise placeholders.
12 |
13 | Returns the string with original contents restored or the original string if it doesn't contain noise placeholders.
--------------------------------------------------------------------------------
/modules/randomQuery.php:
--------------------------------------------------------------------------------
1 | result = $reply;
13 | return json_encode($obj);;
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/simplehtmldom_1_9/phpcompatibility.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Defines rules for PHPCompatibility
4 | ./app
5 | ./example
6 | ./manual
7 | ./testcase
8 | ./tests
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/convert_text.md:
--------------------------------------------------------------------------------
1 | # convert_text
2 |
3 | ```php
4 | convert_text ( string $text ) : string
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `text` | Text to convert.
10 |
11 | Assumes that the provided text is in the form of the configured source character set (see [`sourceCharset`](../simple_html_dom_node/) and converts it to the specified target character set (see [`targetCharset`](../simple_html_dom_node/)).
12 |
13 | Returns the converted text.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/manual/customizing-parsing-behavior.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Customizing Parsing behavior
3 | ---
4 |
5 | ```php
6 | // Write a function with parameter "$element"
7 | function my_callback($element) {
8 | // Hide all
tags
9 | if ($element->tag=='b')
10 | $element->outertext = '';
11 | }
12 |
13 | // Register the callback function with it's function name
14 | $html->set_callback('my_callback');
15 |
16 | // Callback function will be invoked while dumping
17 | echo $html;
18 | ```
--------------------------------------------------------------------------------
/Apis/Apis.php:
--------------------------------------------------------------------------------
1 | useApi($str);
11 | break;
12 | }
13 | else break;
14 | }
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/find.md:
--------------------------------------------------------------------------------
1 | # find
2 |
3 | ```php
4 | find ( string $selector [, int $idx = null [, bool $lowercase = false ]] ) : mixed
5 | ```
6 |
7 | Finds elements in the DOM.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `selector` | A [CSS style selector](/manual/selectors).
12 | | `idx` | Index of the element to return.
13 | | `lowercase` | Matches tag names case insensitive when enabled.
14 |
15 | Returns an array of matches or a single element if `idx` is defined.
--------------------------------------------------------------------------------
/google.php:
--------------------------------------------------------------------------------
1 | ');
7 | $results = str_replace("...", "
", strip_tags(substr($html, $st+8, strlen($html))));
8 |
9 | if(strpos($results, "http") > -1)
10 | $results = substr($results, 0, strpos($results, "http"));
11 | if(strpos($results, "More items") > -1)
12 | $results = substr($results, 0, strpos($results, "More items"));
13 | echo $results;
14 |
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/parse_attr.md:
--------------------------------------------------------------------------------
1 | # parse_attr (protected)
2 |
3 | ```php
4 | parse_attr ( object $node, string $name, array &$space )
5 | ```
6 |
7 | Parses a single attribute starting at the current parsing position in the document.
8 |
9 | | Parameter | Description
10 | | --------- | -----------
11 | | `node` | The current element (node).
12 | | `name` | The attribute name.
13 | | `space` | An array of whitespace sorounding the current attribute (see [Attribute Whitespace](../definitions/#attribute-whitespace)).
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/match.md:
--------------------------------------------------------------------------------
1 | # match (protected)
2 |
3 | ```php
4 | match (
5 | string $exp
6 | , string $pattern
7 | , string $value
8 | , string $case_sensitivity
9 | ) : bool
10 | ```
11 |
12 | | Parameter | Description
13 | | --------- | -----------
14 | | `exp` | Expression
15 | | `pattern` | Pattern
16 | | `value` | Value
17 | | `case_sensitivity` | Case sensitivity
18 |
19 | Matches a single attribute value against the specified attribute selector. See also [`find`](../find/).
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/addClass.md:
--------------------------------------------------------------------------------
1 | # addClass
2 |
3 | ```php
4 | addClass ( mixed $class )
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `class` | Specifies one or more class names to be added.
10 |
11 | Adds one or more class names to the current node.
12 |
13 | **Remarks**
14 |
15 | * To add more than one class, separate the class names with space or provide them as an array.
16 |
17 | **Examples**
18 |
19 | ```php
20 | $node->addClass('hidden');
21 | $node->addClass('article important');
22 | $node->addClass(array('article', 'new'));
23 | ```
--------------------------------------------------------------------------------
/category.json:
--------------------------------------------------------------------------------
1 | {
2 | "apis":{
3 | "apisName":["Wikipedia", "OpenWeather", "Lyrics", "Schedule", "Birthday", "Dictionary", "Youtube","Remember", "Google"],
4 | "apisKws": {
5 | "0": ["search"],
6 | "1": ["weather"],
7 | "2": ["lyrics"],
8 | "3": ["timetable", "schedule", "mess", "pf", "mano", "manoranjitham"],
9 | "4": ["birthday", "birthdays"],
10 | "5": ["meaning", "definition"],
11 | "6": ["play", "play song"],
12 | "7": ["remember"],
13 | "8": ["google", "how to"]
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/parse_charset.md:
--------------------------------------------------------------------------------
1 | # parse_charset (protected)
2 |
3 | ```php
4 | parse_charset ()
5 | ```
6 |
7 | Parses the charset.
8 |
9 | If the callback function `get_last_retrieve_url_contents_content_type` exists, it is assumed to return the content type header for the current document as string.
10 |
11 | Uses the charset from the metadata of the page if defined.
12 |
13 | If none of the previous conditions are met, the charset is determined by `mb_detect_encoding` if multi-byte support is active.
14 |
15 | If multi-byte support is not active the charset is assumed to be `'UTF-8'`.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/prepare.md:
--------------------------------------------------------------------------------
1 | # prepare (protected)
2 |
3 | ```php
4 | prepare ( string $str [, bool $lowercase = true [, string $defaultBRText = DEFAULT_BR_TEXT [, string $defaultSpanText = DEFAULT_SPAN_TEXT ]]] )
5 | ```
6 |
7 | Initializes the DOM object.
8 |
9 | | Parameters | Description
10 | | ---------- | -----------
11 | | `str` | The HTML document string.
12 | | `lowercase` | Tag names are parsed in lowercase letters if enabled.
13 | | `defaultBRText` | Defines the default text to return for `
` elements.
14 | | `defaultSpanText` | Defines the default text to return for `` elements.
--------------------------------------------------------------------------------
/Apis/Dictionary.php:
--------------------------------------------------------------------------------
1 | ');
10 | $meaning = substr($htm, $start+34, $end-$start-35);
11 | $meaning = chopStrs($meaning, ['See more.">']);
12 | $obj = new Class{};
13 | $obj->result = $meaning;
14 | return json_encode($obj);
15 | }
16 | }
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/__set.md:
--------------------------------------------------------------------------------
1 | # __set
2 |
3 | ```php
4 | __set ( string $name, mixed $value )
5 | ```
6 |
7 | | Parameter | Description
8 | | --------- | -----------
9 | | `name` | `outertext`, `innertext` or attribute name.
10 | | `value` | Value to set.
11 |
12 | See [magic methods](http://php.net/manual/en/language.oop5.overloading.php#object.get)
13 |
14 | Sets the outer text of the current node to `$value` if `$name` is `outertext`.
15 |
16 | Sets the inner text of the current node to `$value` if `$name` is `innertext`.
17 |
18 | Otherwise, adds or updates an attribute with name `$name` and value `$value` to the current node.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom/__get.md:
--------------------------------------------------------------------------------
1 | # __get
2 |
3 | ```php
4 | __get ( string $name ) : mixed
5 | ```
6 |
7 | See [magic methods](http://php.net/manual/en/language.oop5.overloading.php#object.get)
8 |
9 | Supports following names:
10 |
11 | | Name | Description
12 | | ---- | -----------
13 | | `outertext` | Returns the outer text of the root element.
14 | | `innertext` | Returns the inner text of the root element.
15 | | `plaintext` | Returns the plain text of the root element.
16 | | `charset` | Returns the charset for the document.
17 | | `target_charset` | Returns the target charset for the document.
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/requirements.md:
--------------------------------------------------------------------------------
1 | | Requirement | Minimum | Recommended |
2 | | ----------- |:-------:|:-----------: |
3 | | PHP Version | 5.6.0 | [Latest stable release](https://www.php.net/supported-versions.php) |
4 | | PHP Extensions | [iconv](https://www.php.net/manual/en/book.iconv.php) | [iconv](https://www.php.net/manual/en/book.iconv.php),
[mbstring](https://www.php.net/manual/en/book.mbstring.php)
5 | | PHP INI Settings | --- | [allow_url_fopen = 1](https://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen) **
6 |
7 | ** This makes it possible to load files from URL using [`file_get_html`](/api/file_get_html/)
--------------------------------------------------------------------------------
/Apis/Youtube.php:
--------------------------------------------------------------------------------
1 | videoTitle = $data["items"][0]["snippet"]["title"];
9 | $obj->videoTitle = str_replace("'", "'", $obj->videoTitle);
10 | $obj->videoTitle = str_replace("(", "{|(", $obj->videoTitle);
11 | $obj->videoTitle = str_replace(")", ")|}", $obj->videoTitle);
12 | $obj->videoId = $data["items"][0]["id"]["videoId"];
13 | $json = json_encode($obj);
14 | return $json;
15 | }
16 | }
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/seek.md:
--------------------------------------------------------------------------------
1 | # seek (protected)
2 |
3 | ```php
4 | seek (
5 | string $selector
6 | , array &$ret
7 | , string $parent_cmd
8 | [, bool $lowercase = false ]
9 | )
10 | ```
11 |
12 | | Parameter | Description
13 | | --------- | -----------
14 | | `selector` | The current selector.
15 | | `ret` | Previous return value (starting point).
16 | | `parent_cmd` | The combinator used before the current selector.
17 | | `lowercase` | Matches tag names case insensitive (lowercase) if enabled.
18 |
19 | Starts by searching for child elements of `$ret` that match the specified selector. Adds matching elements to `$ret` (for the next iteration).
--------------------------------------------------------------------------------
/Sample.json:
--------------------------------------------------------------------------------
1 | {
2 | "0": {
3 | "tag": [
4 | "birthday"
5 | ],
6 | "patter": [
7 | "When is Rachel's birthday?"
8 | ],
9 | },
10 | "1": {
11 | "tag": [
12 | "weather", "climate", "city", "temperature"
13 | ],
14 | "patter": [
15 | "Weather of Lucknow"
16 | ],
17 | },
18 | "2": {
19 | "tag": [
20 | "lyrics"
21 | ],
22 | "patter": [
23 | "Lyrics of Hello"
24 | ],
25 | },
26 | "3": {
27 | "tag": [
28 | "birthday"
29 | ],
30 | "patter": [
31 | "When is Rachel's birthday?"
32 | ]
33 | }
34 | }
--------------------------------------------------------------------------------
/simplehtmldom_1_9/example/example_callback.php:
--------------------------------------------------------------------------------
1 | tag=='input')
8 | $element->outertext = 'input';
9 |
10 | if ($element->tag=='img')
11 | $element->outertext = 'img';
12 |
13 | if ($element->tag=='a')
14 | $element->outertext = 'a';
15 | }
16 |
17 |
18 | // 2. create HTML Dom
19 | $html = file_get_html('http://www.google.com/');
20 |
21 |
22 | // 3. Register the callback function with it's function name
23 | $html->set_callback('my_callback');
24 |
25 |
26 | // 4. Callback function will be invoked while dumping
27 | echo $html;
28 | ?>
--------------------------------------------------------------------------------
/simplehtmldom_1_9/manual/docs/api/simple_html_dom_node/remove.md:
--------------------------------------------------------------------------------
1 | # remove
2 |
3 | ```php
4 | remove ( )
5 | ```
6 |
7 | Removes the current node recursively from the DOM.
8 | Does nothing if the node has no parent (root node);
9 |
10 | **Example**
11 |
12 | ```php
13 | $html = str_get_html(<<
15 |
16 |
17 | | Title |
18 | | Row 1 |
19 |
20 |
21 |