Fetching images and text on an external page

Hey guys,

How would I go about fetching images on a web page given only its URL? You all may be familiar with this functionality if you’ve ever posted a link on Facebook. It lets you choose from images on that page that you can post along with the link.

Thanks guys

I just want to know how it works. How does Facebook’s site grab the images from an external site and allow you to choose from them for when you post it on your Facebook wall?

Like what PHP functions are used, etc.

Do you want to take the link, or like the share this feature on Facebook?