Re: [PHP-DB] Processing a fetched external page
Donovan Hutchinson wrote: Thanks for the fast replies. I understand about stripping tags and identifying areas using regular expressions, however my intention is to display the page intact, with only the content changed. An example being http://www.pootpoot.com/poot/pootify/ Thanks, Don If you're changing the content it's not really intact... ;-) A regexp can do replacement as well with preg_replace. If we haven't answered your question, maybe you need to rephrase it? -- paperCrane -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Processing a fetched external page
Thanks for the fast replies. I understand about stripping tags and identifying areas using regular expressions, however my intention is to display the page intact, with only the content changed. An example being http://www.pootpoot.com/poot/pootify/ Thanks, Don -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Processing a fetched external page
I'm working on a project that takes the content of a URL and does stuff with the content. I've managed to extract the target url's html, and am using str_replace to fix links, stylesheets etc. However, i'm stumped when it comes to processing the text content. Would anyone know how to isolate displayed text (anything in the body, paragraph text, headings etc) and then manipulate this text on a word by word basis? _ Doesn't have much to do with databases, you may want to ask on php-general for more help...but if you're looking for elements on a page then you may want to parse the page for the specific elements with regular expressions seeking out those individual tags. or you can take in the entire page as a string and use strip_tags. http://www.php.net/strip_tags HTH jeff ___ Any suggestions appreciated, Don -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Processing a fetched external page
Donovan Hutchinson wrote: I'm working on a project that takes the content of a URL and does stuff with the content. I've managed to extract the target url's html, and am using str_replace to fix links, stylesheets etc. However, i'm stumped when it comes to processing the text content. Would anyone know how to isolate displayed text (anything in the body, paragraph text, headings etc) and then manipulate this text on a word by word basis? Sure... use strip_tags()/fgetss() and then some regexps (preg_replace()) to clear up any remaining cruft. If you want, I can post you my own brute-force "get all text from a webpage" script :) Bruno Ferreira --- [This E-mail scanned for viruses by Declude Virus] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php