Jump to content

Capturing data from web site


Dutchy

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.