Jump to content


Capturing data from web site

  • Please log in to reply
No replies to this topic

#1 Dutchy

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 13 August 2006 - 11:49 PM


Have a question regarding copying text from web code from a webpage.

When opening a webpage and check the code I want to grab some txt from it.
Here example from which is working:

Want to grab this txt:

<span class="fwb txt1"> nu.nl | Het laatste nieuws lees je het eerst op NU.nl </span> <br /> 

Above is simple because I do the follow:

if ( !isset($title) && eregi('<span class="fwb txt1">(.*)</span>', $data, $title) )

But next I can not grab, here the code:

<div class="f12 dots pb5 mb5">
                                    Vooral hoge score op het gebied van investeringen in arme landen.<br />
                                        <a href=" /news/801559/30/Nederland_doet_het_meest_tegen_armoede.html" class="pc"> a>

I want to grab the text “Vooral hoge score op het gebied van investeringen in arme landen.”.

if ( !isset($info) && eregi('<div class="f12 dots pb5 mb5">(.*)<br />', $data, $info) )

I can see that after  <div class="f12 dots pb5 mb5"> there is a enter and a gab between <div class="f12 dots pb5 mb5"> and the first info in web code.
Is there a solution to solve this, did try many things but no progression until now.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users