Is there any possible way to copy a whole table from an URL with its content to an another page? Is there any possible way to copy a whole table from an URL with its content to an another page? wordpress wordpress

Is there any possible way to copy a whole table from an URL with its content to an another page?


Solution with Curl:

(Download: SimpleHtmlDomParser)

    include('simple_html_dom.php');    $ch1 = curl_init('FirstPageUrl');    curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, TRUE);    curl_setopt($ch1, CURLOPT_RETURNTRANSFER, TRUE);    curl_setopt($ch1, CURLOPT_CONNECTTIMEOUT ,0);    curl_setopt($ch1, CURLOPT_TIMEOUT, 10);    $FirstPage = curl_exec($ch1);    curl_close($ch1);    $FirstPageHtml = str_get_html($FirstPage);    $Table = $FirstPageHtml->find('table[class=specs-product]');    echo $Table;

Solution with Simple Dom Parser:

(Download: SimpleHtmlDomParser)

    include('simple_html_dom.php');    $html = file_get_html('FirstPageUrl',false);    $Table = $html->find('table[class=specs-product]');    echo $Table;

Solution with PHP:

Turn your table into a php variable and pass it to the next page with a session.

How to turn a Div into a Varaible?

What is a Session?