Hi,
I'm having a problem fetching the absolute URL of a remote image. What I'm doing right now is this:
foreach($html->find('img') as $e){
$path = parse_url($e->src, PHP_URL_PATH);
$absolute = realpath($path);
if($e->src==$path){
echo '<img class="pic" src=' . $absolute . '/><br/>';
}
}
This code has been written using the simple html dom project. The ideea is that I can't display images with a relative url in the original coding because they are not located on my server.
So does anyone know how to resolve the absolute path of a remote image?