I want to display some of contents from my one website to an other one live. I am planing using cURL for this job. Here is my code for this task Now by doing this I am able to get the whole contents of fileone.php on my second site I do not want to show the whole page just want to show the contents between the <table></table> tags from my fileone.php on my first site. Can you please guide me how I can make this selection of specific contents between the <table></table> and print them on my 2nd website
<?php echo "<center><h3>ForexPK Live Forex Currency Rates in Pakistan</h3> </center>"; // create a new curl resource $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "http://My-URL.com"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // grab URL, and return output $output = curl_exec($ch); // close curl resource, and free up system resources curl_close($ch); // Replace ' preg_match("/<td class=\"efef\">(.*?)<table.*?cellpadding=\"0\" id=\"table1\">/is",$output,$t); $output=str_replace('<td class="efef">','',$t[0]); $output=str_replace('<table border="0" cellspacing="0" width="80%" cellpadding="0" id="table1">','',$output); $tomorrow = date("Y/m/d"); $output = str_replace( "buy", "$tomorrow", $output); echo $output; ?>