#29 Which PHP libraries to include to fully run the Simple HTML DOM



I’m trying to learn Simple HTML DOM library and tested it on a network PC (Cent OS) with PHP5.2.8 with the following URLs

1) http://www.espncricinfo.com/ci/content/player/country.html?country=1;alpha=C

2) http://www.espncricinfo.com/ci/content/player/country.html?country=1;alpha=A

When I try to load URL2 using $html = file_get_html(); I get $html as an object but when I do the same with URL1 it gives me NULL (not an object) whereas URL2 is a proper URL. I tried to do the same on my local system with xampp 1.8.1 (PHP 5.5.6) and it’s loading both URLs fine. I must work on the network PC so can anyone please tell which libraries are important to be installed with PHP for Simple HTML DOM to work with? Is it MBSTRING (multi byte string library; which is not on the network PC)? Any other?

Looking forward to a quick reply!

Best regards,
Billal Mahmood


  • Billal Mahmood

    Billal Mahmood - 2014-04-25

    I even installed MBSTRING library on the network PC considering that it might be a case of ASCII v.s. Unicode in URL1 but still NO success. Any suggestions how to figure out the missing PHP library?

  • John Schlick

    John Schlick - 2014-04-25

    Many things changed in PHP 5.4. I have no idea if this is the cause but just looking at what you stated... it works for you in php 5.5, and doesn't work for you on 5.2...

    I'd say thats a clue.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks