Hi,

I want to query information using sparql endpoint in a php script.
I could only use get method to submit my query. I want to use larger
queries to submit using post method. I tried something with curl
extension but always got invalid request error.

Anyone did this before? Can you help me?

here what i tried before:


$ch = curl_init("http://dbpedia.org/sparql";);
curl_setopt($ch, CURLOPT_POST      ,1);
curl_setopt($ch, CURLOPT_POSTFIELDS
,'default-graph-uri=http%3A%2F%2Fdbpedia.org&should-sponge=&query='.urlencode($sparql_query).'&format=text%2Fxmll&debug=on');
$sonuc = curl_exec($ch);

Thanks in advance.
Ahmet

------------------------------------------------------------------------------
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to