Dutchy Posted August 13, 2006 Share Posted August 13, 2006 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 https://forums.phpfreaks.com/topic/17450-capturing-data-from-web-site/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.