Jump to content

Archived

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

Dutchy

Capturing data from web site

Recommended Posts

Hi,

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:

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

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:

[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>
                            </div>
[/code]

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.

Regards,
Dutchy

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.