Jump to content


This topic is now archived and is closed to further replies.


Capturing data from web site

Recommended Posts


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.


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.