php - How could I able to open whole website into particuler div? -


i working on website there requirement open website particular div. had try below mentioned code not able output proper appearance.

<div style="overflow-x: hidden; overflow-y: scroll; height:300px; width:100%" >       <?php echo $url ?> </div> 

i have use div. no i-frame nothing else. belowmention code use. , class name of function scraper

  function getpagepost($url, $data = array(), $proxy='', $userpass='', $header = array()) {         $ch = curl_init();          if(!empty($header)){             curl_setopt($ch, curlopt_httpheader, $header );             curl_setopt($ch,curlopt_encoding , "gzip");         }           curl_setopt($ch, curlopt_url, $url);         if($this->usecookie)             curl_setopt ($ch, curlopt_cookiejar, $this->ckfile);                  curl_setopt($ch, curlopt_returntransfer, 1);         curl_setopt($ch, curlopt_followlocation, true);          if(!empty($proxy))         curl_setopt($ch, curlopt_proxy, $proxy);          if(!empty($userpass))         curl_setopt($ch, curlopt_proxyuserpwd, $userpass);          curl_setopt($ch, curlopt_post, 1);         curl_setopt($ch, curlopt_postfields, $data);          $result = curl_exec($ch);          if($result === false) {             $result = curl_error($ch);         }             curl_close($ch);         return $result;     } 

============================================

<?php if(isset($_post['btnsubmit'])){  require_once 'scraper.php'; $scraper = new scraper();  $url = $scraper->getpagepost($_post['url']); ?>         <div style="overflow-x: hidden; overflow-y: scroll; height:300px; width:100%" >           <?php echo $url; ?>      </div>      <?php } ?> 

you need iframe like

<div style="overflow-x: hidden; overflow-y: scroll; height:300px; width:100%" >     <iframe src="<?php echo $url;?>"></iframe> </div> 

but of sites gmail not support because of google's websites have code in there header, "x-frame-option: sameorigin" causes run on google websites. cannot open in iframes


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -