Commit 03f3dc1d authored by Envel Le Hir's avatar Envel Le Hir
Browse files

comply with Wikimedia User-Agent policy

parent c25f3e32
......@@ -55,7 +55,7 @@ $res = file_get_contents('https://query.wikidata.org/sparql?format=json&query='.
?item wdt:P31 ?instanceOf ; wdt:P856 ?url ; wdt:P1800 ?code ; rdfs:label ?label .
FILTER(LANG(?label) = "en") .
}
GROUP BY ?item ?label ?code'));
GROUP BY ?item ?label ?code'), false, stream_context_create(array('http' => array('header' => 'User-Agent: Denelezh/2.0 (https://www.denelezh.org/; webmaster@denelezh.org)'))));
$data = json_decode($res)->results->bindings;
foreach ($data as $project) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment