[wp-hackers] is there a plug in that does browser's text view
halukkaramete at gmail.com
Thu Apr 12 19:40:00 UTC 2012
Thank you. These are the stuff that makes you want to be a programmer
I cannot try it now but for sure in the next 2 days.
But for the time being, why did you comment this;
//$html = new simple_html_dom();
On Thu, Apr 12, 2012 at 12:25 PM, Josh Keen <josh.keen.01 at gmail.com> wrote:
> try this:
> here's an example snippet that gives you the excerpts for a search on Julio
> //create and load the HTML
> //$html = new simple_html_dom();
> $html = file_get_html('https://www.google.com/search?q=julio+iglesias'
> //echo '$html: '.$html;
> foreach($html->find('div.s') as $element)
> //echo $element->text . '<br>';
> echo 'excerpt: ' . $element->plaintext . '<br /><br /><br />';
> On Wed, Apr 11, 2012 at 12:08 PM, Haluk Karamete <halukkaramete at gmail.com
> > Is there a plug in ( or a php snippet you know of ) that extracts the
> > ( filtering down the HTML ) out of a url passed to it?
> > Example:
> > Check this link out
> > In its page body, it's got the following text;
> > "Kofi Annan has urged the UN Security Council to help prevent the
> > of his efforts ..... "
> > Which is the same text that you see when you google that article
> > The plan is that I write a script, that submits to google, gets into
> > html, parses the 1st link and gets that 55 word description out of it and
> > then uses that extraction as a beginning delimiter in getting the 500
> > characters from the destination article. I need that plug in and PHP
> > so that I can work with a cleaner/easier text to deal with.
> > Ofcourse, I can get into the PHP's striptags function and create that
> > snippet myself (but before I get my hands dirty with coding), I thought I
> > double check with you guys.. maybe you guys know of a plug in - or
> > a better way. I thought of getting to the RSS text but I cannot find an
> > RSS content search using google.
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers