danja__: timbl on form
danja_: the web won
danja_: the guy can speak!
danja_: (via @PaulMiller)
danja_: (via @PaulMiller)
tobyink: Parses HTTP Accept headers, including "q" params and, although they're rarely seen in Accept, content-type parameters (e.g. charset).
tobyink: Compares it against a similarly formatted list of content-types that you are willing to provide (your "offers") and returns the best matching offer, taking into account both sets of "q" values.
tobyink: I imagine it will also work for Accept-Language, Accept-Encoding, etc, though that hasn't been tested.
Wikier: seeAlso <http://ptlis.net/source/php-content-negotiation/>
tobyink: <http://ptlis.net/source/php-content-negotiation/> looks reasonable. If I'd known of its existence I probably wouldn't have bothered. Still, mine has the advantage of being able to cope with content-type parameters, such as "text/html;level=4.01;q=0.5".
tobyink: Compares it against a similarly formatted list of content-types that you are willing to provide (your "offers") and returns the best matching offer, taking into account both sets of "q" values.
tobyink: I imagine it will also work for Accept-Language, Accept-Encoding, etc, though that hasn't been tested.
Wikier: seeAlso <http://ptlis.net/source/php-content-negotiation/>
tobyink: <http://ptlis.net/source/php-content-negotiation/> looks reasonable. If I'd known of its existence I probably wouldn't have bothered. Still, mine has the advantage of being able to cope with content-type parameters, such as "text/html;level=4.01;q=0.5".