在wordpress中获取<p>标签内的内容

I am trying to fetch contents inside <p> tags. I read that for HTML parsing in PHP one should opt for DOM parser. I am trying to use str_get_html and file_get_html but i am getting the following error:

Fatal error: Call to undefined function str_get_html()

I am working on xampp (version = 1.7.7). Do I need to modify php.ini file ? I have already said allow_url_fopen = On and I am able to user curl functions also to get website content.

To be able to use the str_get_html() function, you will need to first download a module which defines this function and include it at the top of your php script.

Heres the link to download

Copy the simple_html_dom.php file to the folder where your script is and add the following line of code to the top of YOUR php script..

include('simple_html_dom');