By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,965 Members | 1,702 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,965 IT Pros & Developers. It's quick & easy.

How to extract all URLs inside <img>?

P: n/a
Hi,

I know it could maybe be done with preg_match_all but I dont have any Idea
how to do that.
Anyone knows how can I extract all URLs inside the IMG Tags? (<img
src="???">)

Thanks a lot, Mike.
Jul 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
There's an answer in de.com.lang.php.misc.........
Jul 16 '05 #2

P: n/a
"Mike Ritter" <mf*******@gmx.de> wrote in message news:<bj*************@news.t-online.com>...
Hi,

I know it could maybe be done with preg_match_all but I dont have any Idea
how to do that.
Anyone knows how can I extract all URLs inside the IMG Tags? (<img
src="???">)


preg_match_all("/<img src=\"([^']*?)\">/", $html, $matches);
print_r($matches);

Disclaimer: Not tested.
Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.