I want to list all images from a url.
here is my code snippet which finds an image from a url:
$url = "http://asdf.com/";
$text = @implode("", file($url));
while (eregi("[:space:]*(src)[:space:]*=[:space:]*([^ >]+)", $text , $regs))
{
echo $regs[2];
$text = substr($text, strpos($text, $regs[1]) + strlen($regs[1]));
}
the only problem is that I would like to have it full path but sometimes I
get stuff like:
"../images/test.jpg"
how can I get all images with full path ?