title: How to get full path from relative path
body: <p>I'm trying to access a page from another domain, I can get all other html from php, but the files like images and audio files have relatives paths making them to be looked inside the local server whereas they're on the other server. </p>
  
  <p>I've allowed cross-domain access though PHP from the other page.</p>
  
  <pre><code>header('Access-Control-Allow-Origin: *'); 
  </code></pre>
  
  <p>Then I use AJAX load to load that pages' content.</p>
  
  <pre><code>$('#local_div').load('page_to_load_on_side_B #div_on_that_page');
  </code></pre>
  
  <p>Now,  the path looks like this:</p>
  
  <blockquote>
    <p>../../user/6/535e55ed00978.jpg</p>
  </blockquote>
  
  <p>But I want it to be full like.</p>
  
  <blockquote>
    <p>http//:www.siteB.com/user/6/535e55ed00978.jpg</p>
  </blockquote>
  
  <p><strong>Correction</strong>: I have full access to both sites so I need to get the absolute paths from the site where these files are originating.</p>