PHP: http_negotiate_ctype - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

http_negotiate_language http_negotiate_charset

Last updated: Sat, 27 Jan 2007

view this page in

# http_negotiate_ctype

(no version information, might be only in CVS)

http_negotiate_ctype -- Negotiate clients preferred content type

## Описание

string http_negotiate_ctype ( [array supported [, array &result]] )

This function negotiates the clients preferred content type based on its `Accept` HTTP header. The qualifier is recognized and content types without qualifier are rated highest.

## Список параметров

`supported`

  Array containing the supported content types as values

`result`

  Will be filled with an array containing the negotiation results

## Возвращаемые значения

Returns the negotiated content type or the default content type (i.e. first array entry) if none match.

## Примеры

Пример 1. Using http_negotiate_ctype()

`<?php $ctypes = array('application/xhtml+xml', 'text/html'); http_send_content_type(http_negotiate_content_type($ctypes)); ?>`

add a note User Contributed Notes
http_negotiate_ctype
There are no user contributed notes for this page.
http_negotiate_language http_negotiate_charset

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST