Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- array (
- 0 => 'HTTP/1.1 200 OK',
- 1 => 'Date: Mon, 17 Jun 2019 19:32:37 GMT',
- 2 => 'Server: Apache/2.4.38 (Win32) OpenSSL/1.1.1a PHP/7.2.15',
- 3 => 'X-Powered-By: PHP/7.2.15',
- 4 => 'Set-Cookie: Avisistema=ihk9t1ms6r8i0u1j5t6jpjrqei; path=/; HttpOnly',
- 5 => 'Expires: Thu, 19 Nov 1981 08:52:00 GMT',
- 6 => 'Cache-Control: no-store, no-cache, must-revalidate',
- 7 => 'Pragma: no-cache',
- 8 => 'Set-Cookie: Avisistema=ihk9t1ms6r8i0u1j5t6jpjrqei; expires=Tue, 18-Jun-2019 03:32:37 GMT; Max-Age=28799; path=/; HttpOnly',
- 9 => 'Set-Cookie: SageFirmeware=Avisistema.A.0.2015.01.10; expires=Tue, 18-Jun-2019 03:32:37 GMT; Max-Age=28799; path=/; HttpOnly',
- 10 => 'Content-Length: 232',
- 11 => 'Content-Type: application/json',
- )
- //array construct:
- $header = array_filter(explode(PHP_EOL, substr($Data, 0, curl_getinfo($ch, CURLINFO_HEADER_SIZE))));
- //Array Walk ...
- foreach ($header as $line) {
- $leed = explode(':', $line);
- if (strpos($leed[0], "Content-Type") !== false) {
- $head = str_replace(' ', '', $leed[1]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement