if i have a string
<div> balah balah <img src='image/www.png' /> balah balah</div>
<div> balah balah <img src='image/ttt.png' /> balah balah</div>
<div> balah balah <img src='image/rrr.png' /> balah balah</div>
how could i found image name which is in src. I use this code
$pos = strpos($srt,".png");
for find position of .png and i got position.
I found the first one ".png" but no any way found to traverse from ".png" to "/" back.
How could i found the name in between of "/" and "." which is "www".
Little bit confusion.
Updated Question: actual problem
suppose i got HTML
from URL via PHP
with help of cURL()
.
how could i retrieve all images names and store in a folder.