Dzięki,
Poszedłem Twoim tropem + manual i zrobiłem coś takiego:
Kod
$url = get_headers('http://www.wp.pl/', 0);
print_r($url);
Ale wyświetla mi bardzo dużo rzeczy:
Kod
Array
(
[0] => HTTP/1.0 200 OK
[1] => Server: aris
[2] => Expires: Mon, 26 Jul 1997 05:00:00 GMT
[3] => Last-Modified: Sun, 19 Aug 2007 09:59:35 GMT
[4] => Cache-Control: no-store, no-cache, must-revalidate
[5] => Cache-Control: post-check=0, pre-check=0
[6] => Cache-Control: no-cache
[7] => Pragma: no-cache
[8] => Content-type: text/html; charset=ISO-8859-2
[9] => Set-Cookie: reksticket=1187517575; expires=Tue, 21-Aug-07 09:59:35 GMT; path=/; domain=.www.wp.pl
[10] => Set-Cookie: rekticket=1187517575; expires=Tue, 21-Aug-07 09:59:35 GMT; path=/; domain=.wp.pl
[11] => Set-Cookie: statid=62.233.135.10.5119:1187517575:2411870806:v1; path=/; expires=Wed, 18-Aug-10 09:59:35 GMT
[12] => Set-Cookie: statid=62.233.135.10.5119:1187517575:2411870806:v1; domain=.wp.pl; path=/; expires=Wed, 18-Aug-10 09:59:35 GMT
[13] => Content-Length: 111646
[14] => Connection: close
)
A ja chciałbym wyciągnąć z tego tylko to
HTTP/1.0 200 OK i chciałbym wstawić to do jakiejś zmiennej
Jak to zrobić?