I want a load the contents of my website via CURL . However I dont want the etire website contents. I just want the body part of it .
The link to my website is : www.sanjosespartan.com/blog
.
The code for CURL is :
[insert_php]
$ch = curl_init("http://www.sanjosespartan.com/blog/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
echo curl_exec($ch);
curl_close($ch);
[/insert_php]
THis loads all the CSS and other data in my URL.
But, I want to echo only this part :
"<div class="entry-content">
<p>Welcome to ‘Books for Geeks’!!</p>
<p><a href="http://sanjosespartan.com/blog" title="BookForGeeks" target="_blank">BooksForGeeks</a> offers you over 10 million titles across categories such as Children’s Books, Business & Economics, Indian Writing and Literature & Fiction.</p>
<p>Reading books is the favourite pastime of many people. If you’re bitten by the book-bug too, then there is a massive collection of books for you to read. From bestsellers to new & future releases, the choices are exhaustive when you shop onlineat India’s Largest Bookstore.</p>
<p>From books for dummies, to textbooks for students, there are a wide variety of books. You can explore the young adults books store if you’re looking to gift a nice book to a teenager, where you can find books from the best-selling series.</p>
<p>Innumerable books are divided under various categories like action & adventure, business & economics, comics & mangas, crime, thriller & mystery, fiction, humour, and romance. You can browse by genre when you buy online making it more convenient for you to narrow down your choices. Then there are biographies and true accounts bestsellers as well. These books are available in different formats like hardcover, paperback, and board book.</p>
</div>"
How can I achieve this ? Strip HTML tags ?