1) I want to get the image's filenames from a website:
e.g. src="http://bytes.com/images/world.jpg", src=images/world.jpg and src='images/world.jpg' should result in "world"
Expand|Select|Wrap|Line Numbers
- $imgfilenames=preg_match_all('/^[0-9A-Za-z_ ](.jpg|.gif|.JPG|.GIF|.png|.PNG)$/i', $html, $matches);
Expand|Select|Wrap|Line Numbers
- $alttags=preg_match_all('/<img[^>]*alt="([^"]*)"/i', $html, $matches);