Get full path to image from php
<p>Hy!</p>

<p>I parse a website with simplehtml dom to get all links from the pictures.</p>

<p>The problem is that the link is like "/pics/bla.jpg".</p>

<p>I have the full path from the website like "http://xxx.xxx/blob/gulsch".</p>

<p>Now i want to get the full image link from the image (<strong>link root + /pics/bla.jpg</strong>) (no concat)
like: <a href="http://xxx.xxx/pics/bla.jpg" rel="nofollow">http://xxx.xxx/pics/bla.jpg</a></p>

<p>This should work for many websites</p>

<p>I tried it with explode() </p>

<pre><code>$root = explode("/", $link);
echo $root[2];
</code></pre>

<p>I never get it working.</p>

<p>Please help.</p>
