Jump to content

How to extract data from html code?


ivytony

Recommended Posts

For example, here's a paragraph of text in HTML code:

 

<a href="http://www.metacafe.com/watch/23483/cute_girl/"><img src="http://s1.mcstatic.com/thumb/2348336/9545650/4/directors_cut/0/1/cute_smart_girl.jpg" align="right" border="0" alt="Cute Smart Girl" vspace="4" hspace="4" width="134" height="78" /></a>
				<p>
				laugh and leave comment					<br>Ranked <strong>4.46</strong> / 5 | 4995 views |

 

I would like to extract the image link, 'laugh and leave comment', and the numbers 4.46 and 4995 from the above paragraph. I wonder if it's possible to do this with PHP.

Link to comment
https://forums.phpfreaks.com/topic/142919-how-to-extract-data-from-html-code/
Share on other sites

Archived

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

×
×
  • 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.