| 1 |
--- |
| 2 |
title: file_get_html |
| 3 |
--- |
| 4 |
|
| 5 |
# file_get_html |
| 6 |
|
| 7 |
```php |
| 8 |
file_get_html ( string $url [, bool $use_include_path = false [, resouce $context = null [, int $offset = 0 [, int $maxLen = -1 [, bool $lowercase = true [, bool $forceTagsClosed = true [, string $target_charset = DEFAULT_TARGET_CHARSET [, bool $stripRN = true [, string $defaultBRText = DEFAULT_BR_TEXT [, string $defaultSpanText = DEFAULT_SPAN_TEXT ]]]]]]]]]] ) |
| 9 |
``` |
| 10 |
|
| 11 |
Parses the provided file and returns the DOM object. |
| 12 |
|
| 13 |
| Parameter | Description |
| 14 |
| --------- | ----------- |
| 15 |
| `url` | Name or URL of the file to read. |
| 16 |
| `use_include_path` | See [](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters`file_get_contents`](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters) |
| 17 |
| `context` | See [](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters`file_get_contents`](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters) |
| 18 |
| `offset` | See [](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters`file_get_contents`](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters) |
| 19 |
| `maxLen` | See [](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters`file_get_contents`](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters](http://php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-parameters) |
| 20 |
| `lowercase` | Forces lowercase matching of tags if enabled. This is very useful when loading documents with mixed naming conventions. |
| 21 |
| `forceTagsClosed` | Obsolete. This parameter is no longer used by the parser. |
| 22 |
| `target_charset` | Defines the target charset when returning text from the document. |
| 23 |
| `stripRN` | If enabled, removes newlines before parsing the document. |
| 24 |
| `defaultBRText` | Defines the default text to return for `<br>` elements. |
| 25 |
| `defaultSpanText` | Defines the default text to return for `<span>` elements. |
| 26 |
|