protected function parseIncomingCookies($headers)
    {
        $this->incomingTrackerCookies = array();
        
        if (!empty($headers)) {
            $headerName = 'set-cookie:';
            $headerNameLength = strlen($headerName);
            
            foreach($headers as $header) {
                if (strpos(strtolower($header), $headerName) !== 0) {
                    continue;
                }
                $cookies = trim(substr($header, $headerNameLength));
                $posEnd = strpos($cookies, ';');
                if ($posEnd !== false) {
                    $cookies = substr($cookies, 0, $posEnd);
                }
                parse_str($cookies, $this->incomingTrackerCookies);
            }
        }   
    }
protected function parseIncomingCookies($headers)
    {
        $this->incomingTrackerCookies = array();
        
        if (!empty($headers)) {
            $headerName = 'set-cookie:';
            $headerNameLength = strlen($headerName);
            
            foreach($headers as $header) {
                if (strpos(strtolower($header), $headerName) !== 0) {
                    continue;
                }
                $cookies = trim(substr($header, $headerNameLength));
                $posEnd = strpos($cookies, ';');
                if ($posEnd !== false) {
                    $cookies = substr($cookies, 0, $posEnd);
                }
                parse_str($cookies, $this->incomingTrackerCookies);
            }
        }   
    }
protected function parseIncomingCookies ( $ headers ) { $ this -> incomingTrackerCookies = array ( ) ; if ( ! empty ( $ headers ) ) { $ headerName = 'set-cookie:' ; $ headerNameLength = strlen ( $ headerName ) ; foreach ( $ headers as $ header ) { if ( strpos ( strtolower ( $ header ) , $ headerName ) !== 0 ) { continue ; } $ cookies = trim ( substr ( $ header , $ headerNameLength ) ) ; $ posEnd = strpos ( $ cookies , ';' ) ; if ( $ posEnd !== false ) { $ cookies = substr ( $ cookies , 0 , $ posEnd ) ; } parse_str ( $ cookies , $ this -> incomingTrackerCookies ) ; } } }
Reads incoming tracking server cookies.

@param $headers Array with HTTP response headers as values
Reads incoming tracking server cookies .