You can use a regular expression (regex) to go through the page source and parse all the IMG tags.
This regex will do the job quite nicely: <img[^>]+src="(.*?)"
How does this work?
// <img[^>]+src="(.*?)"
//
// Match the characters "<img" literally «<img»
// Match any character that is not a ">" «[^>]+»
// Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+»
// Match the characters "src="" literally «src="»
// Match the regular expression below and capture its match into backreference number 1 «(.*?)»
// Match any single character that is not a line break character «.*?»
// Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?»
// Match the character """ literally «"»
Sample PHP code:
preg_match_all('/<img[^>]+src="(.*?)"/i', $subject, $result, PREG_PATTERN_ORDER);
for ($i = 0; $i < count($result[0]); $i++) {
// image URL is in $result[0][$i];
}
You'll have to do a bit more work to resolve things like relative URLs.