Skip to content

Instantly share code, notes, and snippets.

@symac symac/proxy.php
Created Jan 24, 2016

Embed
What would you like to do?
<?php
if (isset($_GET["mimetype"]))
{
$type = $_GET["mimetype"];
}
else
{
$type = "";
print "Manque le mimetype";
exit;
}
$content = file_get_contents("http://fr.dbpedia.org/sparql?default-graph-uri=&query=select+distinct+*+where+{%3FPerson+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FbirthDate%3E+%3FdateDeNaissance.+%0D%0A++%3FPerson+a+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FArtist%3E.+%0D%0A++FILTER+regex%28%3FdateDeNaissance%2C+%22^1947%22%29+}&format=text%2Fxml&timeout=0&debug=on");
if ($type == "xml")
{
header('Content-Type: text/xml');
}
elseif ($type == "sparql") {
header('Content-Type: application/sparql-results+xml');
}
print $content;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.