There are two sites on the domain and subdomain written in PHP.
It is necessary to display the statistics page on the second site from one site For example, the statistics page has a link http://poddomen.site.ru/counter.php .
How to display it on the second site? The page is prepared, and it needs to be displayed entirely, without cutting anything.
I read how to parse the page, cutting out links and images, but I did not find how to display the whole page.
Request to those who want to really answer the question: Write the entire code.
If you do not know or want to be smart, do not write anything. Fluderasty - not welcome.
I tried using Curl:
$url = "http://poddomen.site.ru/counter.php"; $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch, CURLOPT_ENCODING, "" ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt( $ch, CURLOPT_TIMEOUT, $timeout ); $result = curl_exec($ch); curl_close($ch); var_dump($result);
The page is displayed, but there is also a message that I do not understand:
string (724) "The content of the output page"
That is, the extra characters are string (724) "" For what reason could it be?