, original. virtual(), apache , virtual. ( apache_response_headers()) array_diff():
<?php
$original = apache_response_headers();
virtual('somepage.php');
$virtual = apache_response_headers();
$difference = array_diff($virtual, $original);
print_r($difference);
?>
- this:
, , .
, . cURL:
<?php
header('Content-Type: text/plain; charset=utf-8');
$cUrl = curl_init();
curl_setopt($cUrl, CURLOPT_URL, "http://somewhere/somepage.php");
curl_setopt($cUrl, CURLOPT_HEADER, true);
curl_setopt($cUrl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($cUrl);
curl_close($cUrl);
print_r($response);
?>