Simple Content Negotiation for RDF service application with PHP
Need to serve up HTML for most users, but have an RDF representation of your resource?
Simply pop in:
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
0 Comments:
Post a Comment
<< Home