]*?src=[\'"]?(.*?)[\'" >]|i', $page, $matches); foreach (array_unique($matches[1]) as $image_link) { $result[] = link_to_absolute($url, $image_link); } return count($result) ? $result : 0; } /* * Function: get_image_urls * * Purpose: If the page is a frameset, rerurn the image URLs from all * its frame SRCes, else from the page itself. */ function get_image_urls($page, $url) { preg_match_all('|]*?src=[\'"]?(.*?)[\'" >]|i', $page, $matches); if (count($matches[1])) { foreach(array_unique($matches[1]) as $frame_link) { $framebuf = slurp_page(link_to_absolute($url, $frame_link)); $result = array_merge($result, get_image_urls_sp($framebuf, link_to_absolute($url, $frame_link))); } } else { $result = get_image_urls_sp($page, $url); } return array_values(array_unique($result)); } /* * Function: error_abort * Purpose: Return an error page with $title and $message */ function error_abort($title, $message) { if ($title == "invalid") /* shortcut */ { $title = "Invalid Feedback Submission"; } echo ("
Valid HTML 4.01 Transitional