Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old January 31st, 2005, 08:14 AM
Registered User
Join Date: Jan 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default strip html from spider script results

I have a script that spiders a news site and grabs the html and displays it. Yes, I do have permission for this! I want to be able to strip everything, outside of the <body></body> tags and only display what is inside the body tags. below is the current code I'm using...

    $url = "http://www.genericmetalnews.com/";
    $fp = fopen($url, 'rb');

    while(($data = fgets($fp, 1024)) !== false)
        echo $data;
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
strip html tags with xslt smiter XSLT 4 June 19th, 2012 08:34 AM
results in view source but not on html page monstermash Classic ASP Basics 25 July 9th, 2007 02:22 AM
Strip HTML with ASP Question ryanpatrick Classic ASP Professional 1 January 17th, 2005 07:15 AM
Getting results from Select Multiple HTML tag dpjoff PHP How-To 9 February 2nd, 2004 03:03 PM
strip html tags & PHP trangd Beginning PHP 6 October 21st, 2003 10:28 AM

All times are GMT -4. The time now is 01:16 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.