I have this html code:
<marquee align="left" id="LatestNewsM" SCROLLAMOUNT="4" loop="infinite" direction="right">
<font dir="rtl" valign="top" class="StringTheme" style="font-size:14px;">test test test</font>
<img src="/Portal/images/LightVersionWeb2/jazeeraTicSep.gif" align="middle">
<font dir="rtl" valign="top" class="StringTheme" style="font-size:14px;">test sample text sample</font>
<img src="/Portal/images/LightVersionWeb2/jazeeraTicSep.gif" align="middle">
<font dir="rtl" valign="top" class="StringTheme" style="font-size:14px;">text text 222 another text</font>
<img src="/Portal/images/LightVersionWeb2/jazeeraTicSep.gif" align="middle">
...........
.....
</marquee>
and this PHP code:
$homepage = file_get_contents('http://www.site.com');
How I can search in the content and get only the text inside Font tag <font>
file_get_contents(); I've edited it accordingly. Besides that.. a DOM parser is the way to go - please don't even think about using regular expressions for it.<marquee>and<font>?! Please tell me you're just scraping data from a decades-old site in order to update it to modern standards...