PDA

Click to See Complete Forum and Search --> : Fetch URLs from HTML page


usamaalam
May 28th, 2009, 07:39 AM
Hello everybody,

I need your help to fetch URLs from an HTML page. I have HTML of a page in a string variable and I need to fetch all the URLs of images, css, javascript etc. URL can be "http://www.abc.com/images/myimage.jpg" or "images/myimage.jpg" or "myimages/myimage.jpg" or "style/style.css" etc.

Is there a way to do this with PHP?

Thanks.

nmadd
May 28th, 2009, 03:59 PM
I'd probably Google something like "php url regular expression" to at least get you started on the right path.