Simple Content Negotiation for RDF service application with PHP

3 years ago

Need to serve up HTML for most users, but have an RDF representation of your resource?Simply pop in:$accept = explode(',', $_SERVER['HTTP_ACCEPT']);if (in_array('application/rdf+xml', $accept)) { header('Location: path/to/rdf/version.rdf'); die();}Labels: http, php, rdf, semantic web, tips ... Continue reading

Source: clockwerx.blogspot.com