using str_replace with file_get_contents
<p>I am using file_get_contents to grab a page, but i need to replace some data in the contents of the page before echoing it. </p>

<p>I have this so far (this script runs on domain2.com)</p>

<pre><code>&lt;?php
$page = file_get_contents('http://domain.com/page.html');
str_replace('href="/','href="http://domain.com','$page');
echo $page;
?&gt;
</code></pre>

<p>The problem is, that when the page displays, some links on the domain.com page read:</p>

<pre><code>&lt;a href=/about.html&gt;
</code></pre>

<p>Which when i call in my script, are prepending it with the incorrect domain. I tried using str_replace, to look for</p>

<pre><code>href="/
</code></pre>

<p>and replace it with</p>

<pre><code>href="http://www.domain.com/
</code></pre>

<p>But its not working. Any clues?</p>
