$html = file_get_html('http://www.livelifedrive.com/');
echo $html->plaintext;
I've no problem scraping other websites but this particular one returns gibberish.
Is it encrypted or something?
There's nothing really like site encryption, if the content can reach your browser and is HTML, it can be scraped.
It's probably because the site uses a lot of Javascript and Flash which cannot be scraped by an HTML parser. Even Google itself is just begginning to make inroads into accurate scraping of flash and Javascript.
To scrape a site in it's browser glory, try Selenium.
Links:
https://code.google.com/p/php-webdriver-bindings/
https://groups.google.com/forum/#!topic/selenium-users/Rj6BYEkz9Q0
A neat tip to know what you can scrape using an HTML scraper, try disabling Javascript and Flash on your browser and loading the website. The content you can view is easily scrapable - the rest you have to be a little more clever in your methods.
Maybe the files on their servers aren't saved as UTF-8? I've tried your function on several sites and sometimes it works (on servers I know that they save their files as UTF-8, and not just stating those are encoded in UTF-8) and some other times it gives gibberish.
Try testing it yourself on your local machine, parsing files saved as UTF-8 and other encodings, and see what comes up...
$html->plaintext;
This will give you only text but if you need to fetch html then you need to use
$html->innertext;
For more information you can refer http://simplehtmldom.sourceforge.net/manual.htm
Actually, the gibberish you see is a GZIPed content.
When I fetch the content with hurl.it for instance, here are the headers returned by server:
So once you have scraped the content, unzip it. Here is a sample code:
References: