Сообщение от wadim
|
Где здесь кодировка указана?
|
Значит мета тегом передается. Вот заголовки вашей темы:
[0] => HTTP/1.1 302 Moved Temporarily
[1] => Date: Sun, 14 Jan 2018 19:52:55 GMT
[2] => Content-Type: text/html;
charset=utf-8
[3] => Content-Length: 0
[4] => Connection: close
[5] => Set-Cookie: __cfduid=d8fe7c22acc4f2223e8930e3516638cac15159595 75; expires=Mon, 14-Jan-19 19:52:55 GMT; path=/; domain=.javascript.ru; HttpOnly
[6] => Set-Cookie: vbsessionhash=442871cd85ad99e848562beabde621c1; path=/; domain=.javascript.ru; HttpOnly
[7] => Set-Cookie: vblastvisit=1515959555; expires=Mon, 14-Jan-2019 19:52:35 GMT; path=/; domain=.javascript.ru; secure
[8] => Set-Cookie: vblastactivity=0; expires=Mon, 14-Jan-2019 19:52:35 GMT; path=/; domain=.javascript.ru; secure
[9] => Cache-Control: private
[10] => Pragma: private
[11] => Location:
Получение метатега keywords
[12] => X-Content-Type-Options: nosniff
[13] => X-Frame-Options: sameorigin
[14] => Access-Control-Allow-Origin:
http://javascript.ru
[15] => Access-Control-Allow-Credentials: true
[16] => Access-Control-Allow-Headers: User-Agent,Dnt,pragma,cache-control,authority
[17] => Server: cloudflare
[18] => CF-RAY: 3dd3236f1a174e48-DME
[19] => HTTP/1.1 200 OK
[20] => Date: Sun, 14 Jan 2018 19:52:55 GMT
[21] => Content-Type: text/html;
charset=utf-8
[22] => Connection: close
[23] => Set-Cookie: __cfduid=d1d31a14e29eb01d07053d3911574acd115159595 75; expires=Mon, 14-Jan-19 19:52:55 GMT; path=/; domain=.javascript.ru; HttpOnly
[24] => Set-Cookie: vbsessionhash=400d34983d0a29c01826d97b3b6a1c0d; path=/; domain=.javascript.ru; HttpOnly
[25] => Set-Cookie: vblastvisit=1515959555; expires=Mon, 14-Jan-2019 19:52:35 GMT; path=/; domain=.javascript.ru
[26] => Set-Cookie: vblastactivity=0; expires=Mon, 14-Jan-2019 19:52:35 GMT; path=/; domain=.javascript.ru
[27] => Cache-Control: private
[28] => Pragma: private
[29] => X-Content-Type-Options: nosniff
[30] => X-Frame-Options: sameorigin
[31] => Access-Control-Allow-Origin:
http://javascript.ru
[32] => Access-Control-Allow-Credentials: true
[33] => Access-Control-Allow-Headers: User-Agent,Dnt,pragma,cache-control,authority
[34] => Server: cloudflare
[35] => CF-RAY: 3dd3237290614e0c-DME
Дважды думаю понятно почему и пояснять не требуется. А вообще получать надо только нужное
get_headers($url, 1)['Content-Type'];
Если документ не перемещался, то будет значение заголовка, в противном случае массив.