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