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
I am planing using cURL for this job.
Here is my code for this task
Code:
<?php
// create a new curl resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "[URL unfurl="true"]http://www.telecom.1pk.asia/fileone.php");[/URL]
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);
// Print output
echo $output;
?>
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