As in the variable to find the row and put it in another variable?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
5 views
How to find variable in a search and bring it?
with the regexps are not familiar at all, and there definitely have
HTTP/1.1 301 Moved Permanently Location: https://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Fri, 04 May 2018 17:59:00 GMT Expires: Sun, 03 Jun 2018 17:59:00 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 220 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Alt-Svc: hq=":443"; ma=2592000; quic=51303433; quic=51303432; quic=51303431; quic=51303339; quic=51303335,quic=":443"; ma=2592000; v="43,42,41,39,35" Connection: close

to find and display what comes after content-type
by | 5 views

1 Answer

0 like 0 dislike
$headers = 'HTTP/1.1 301 Moved Permanently Location: https://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Fri, 04 May 2018 17:59:00 GMT Expires: Sun, 03 Jun 2018 17:59:00 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 220 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Alt-Svc: hq=":443"; ma=2592000; quic=51303433; quic=51303432; quic=51303431; quic=51303339; quic=51303335,quic=":443"; ma=2592000; v="43,42,41,39,35" Connection: close'; if (preg_match("/Content-Type: (.*)/ui", $headers, $match)) { $headers_part = $match[1]; }
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
asked May 22, 2019 by anton99zel
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
35,405 users