title: Using file_get_contents or curl to embed html from a source outside my domain
body: <p>We are developing a web app that enables the end user to place a bit of code on their webpage, so that anyone who visits their page will see a little pop up button on the edge of the browser window.  When clicked, it opens a small panel where they can enter a telephone number for the website owner to call them back.</p>
  
  <p>I am running up against a security issue.  I am attempting to use server side include to place the button on the client's website.  However, because this included site is on a different domain than the client's website, it is not allowed.</p>
  
  <p>I have tried these two methods that I got from online forums, neither of which worked for me.  </p>
  
  <ol>
  <li><p>Use the <code>file_get_contents</code> handler, like this;</p>
  
  <pre><code>$includeFile =   
  file_get_contents("http://bizzocall.com/subdomains/dev/httpdocs/slideouttesttopDATA.php");
  echo $includeFile;
  </code></pre></li>
  </ol>
  
  <blockquote>
    <p>ERROR failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found.</p>
  </blockquote>
  
  <ol start="2">
  <li><p>Use curl, like this:</p>
  
  <pre><code>function curl($url){
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
      $data = curl_exec($ch);
      curl_close($ch);
      return $data;
  }
  
  
      $feed = 'http://bizzocall.com/subdomains/dev/httpdocs/slideouttesttopDATA.php';
      $bizzobtn = curl($feed);
      echo $bizzobtn;
  </code></pre></li>
  </ol>
  
  <p>This didn't work either.</p>
  
  <blockquote>
    <p>ERROR  The requested URL /subdomains/dev/httpdocs/slideouttesttopDATA.php was not found on this server. </p>
  </blockquote>
  
  <p>This looks like its truncating the bizzocall.com/ off of the url.  Perhaps If I knew how to write this chunk of code correctly,this would work.</p>
  
  <p>Any help here would be welcome!</p>