title: PHP Simple HTML DOM Parser > Modify Fetched Links
body: <p>i have a script which will  fetch content from a website, what i wanna do is modify all that links. Suppose:<br /></p>
  
  <pre><code>$html = str_get_html('&lt;h2 class="r"&gt;&lt;a class="l" href="http://www.example.com/2009/07/page.html" onmousedown="return curwt(this, 'http://www.example.com/2009/07/page.html')"&gt;SEO Result Boost &lt;b&gt; &lt;/b&gt;&lt;/a&gt;&lt;/h2&gt;');
  </code></pre>
  
  <p>so, is it possible to modify or rewrite it in this way> <br /></p>
  
  <pre><code>&lt;h2 class="r"&gt;&lt;a class="l" href="http://www.site.com?http://www.example.com/2009/07/page.html"&gt;SEO Result Boost &lt;b&gt; &lt;/b&gt;&lt;/a&gt;&lt;/h2&gt;
  </code></pre>
  
  <p><br />I have read it's manual but can not understand how to figure it ( <a href="http://simplehtmldom.sourceforge.net/#fragment-12" rel="nofollow">http://simplehtmldom.sourceforge.net/#fragment-12</a> )<br /></p>
  
  <h2>Is  It Possible, Any Idea?</h2>