collector->id; foreach ( $this->get_output() as $key => $value ) { if ( ! is_scalar( $value ) ) { $value = json_encode( $value ); } # Remove illegal characters (Header may not contain NUL bytes) if ( is_string( $value ) ) { $value = str_replace( chr( 0 ), '', $value ); } header( sprintf( 'X-QM-%s-%s: %s', $id, $key, $value ) ); } } }