title: PHP: Embedding website into page
body: <p>I want to call a website and embed it into a table cell. I have no problem getting the request for the site or the url from the database. But when I embed it, it jumbles it and puts it all over the place or doesn't open the entire page.</p>
  
  <p>I have:</p>
  
  <pre><code>$remote = fopen("http://www.theothersite.com/list.php", "r");
  fpassthru($remote);
  </code></pre>
  
  <p>Are there any other cleaner solutions?</p>
  
  <p>iframe shows up blank:
  echo <code>'&lt;iframe src="'.$row[$url].'" width="100%" /&gt;'</code>;</p>
  
  <pre><code>        $url = 'URL';
          $tag = 'Tag';
          $id = 'P_Id';
  
          $query = "SELECT * FROM web_db WHERE Tag = '" . $userTag . "' ORDER BY RAND() LIMIT 1";
  
          $result = mysql_query($query);
          if($result) 
          {
              while($row = mysql_fetch_array($result))
             {
                echo 'ID:' . $row[$id] . '&lt;br&gt;';
                echo 'URL: ' . $row[$url] . '&lt;br&gt;';
                echo 'Tag:' . $row[$tag] . '&lt;p&gt;';
  
  
          //    $remote = fopen($row[$url],"r");
          //    fpassthru($remote);
  
              echo '&lt;iframe src="'.$row[$url].'" width="100%" /&gt;';
  </code></pre>