Note that there are some explanatory texts on larger screens.

plurals
  1. POHow could I able to open whole website into particuler div?
    primarykey
    data
    text
    <p>I am working on a website where there is a requirement to open another website into particular div. I had try below mentioned code but I am not able to get output with proper appearance. </p> <pre><code>&lt;div style="overflow-x: hidden; overflow-y: scroll; height:300px; width:100%" &gt; &lt;?php echo $url ?&gt; &lt;/div&gt; </code></pre> <p>I have to use only div. no I-frame nothing else. belowmention code i am use. and class name of this function is Scraper</p> <pre><code> 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-&gt;useCookie) curl_setopt ($ch, CURLOPT_COOKIEJAR, $this-&gt;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; } </code></pre> <p>============================================</p> <pre><code>&lt;?php if(isset($_POST['btnsubmit'])){ require_once 'scraper.php'; $scraper = new Scraper(); $url = $scraper-&gt;getPagePost($_POST['url']); ?&gt; &lt;div style="overflow-x: hidden; overflow-y: scroll; height:300px; width:100%" &gt; &lt;?php echo $url; ?&gt; &lt;/div&gt; &lt;?php } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload