thauex / simple-html-dom
Modified version of http://sourceforge.net/projects/simplehtmldom/ with cache support
Installs: 44 254
Dependents: 2
Suggesters: 0
Security: 0
Stars: 14
Watchers: 5
Forks: 6
Open Issues: 0
Requires
- php: >=5.3.2
This package is not auto-updated.
Last update: 2020-05-13 15:23:16 UTC
README
Modified version of http://sourceforge.net/projects/simplehtmldom/ with cache support
####Cache info The cache writes the content of the website into a text file in the cache folder. The file is named by the md5 hash of the url. When the file is older than the default cache duration (24h), it will be overwritten.
####Simple cache example In this example the cache folder is set to "mycachefolder", the default value is "cache".
The methode fileGetHtml has a new param, which is called $hours, this sets the cache duration. In further version the param will be changed to a static variable.
<?php
use ThauEx\SimpleHtmlDom\SHD;
SHD::$fileCacheDir = "mycachefolder";
$html = SHD::fileGetHtml("http://google.de/");
?>