I am trying to get images from a URL using php. I used this link
Get all images url from string
I got it working, but As I tested it, I came across URLs, where
URL is www.myurl.com/pianos/new/steinway.html?kID=243 which can contain an image
either <img src="/images/SteinwayGrand.jpg">
or <img src="http://www.myurl.com/images/SteinwayGrand.jpg">
I am trying to address both these cases, and make the script working, ie display images on my page.
Can anyone suggest some way to cover this kind of tags?
Got the answer from this post:
Scrape FULL image src with PHP
with bit of modification to match my application.