Need help with API HTML from PHP

Hi, i want to write any queries from PHP using file_get_contents with the API HTML but have problems. If i write a single command as:

echo file_get_contents('http://admin:admin@localhost:5820/ontoBecas/size');

but if i write a query, for example:

echo file_get_contents('http://admin:admin@localhost:5820/ontoBecas/query?query=SELECT ?x WHERE {?x a :Estudiante}');

the response is a error 400: Bad request.

If anyone has examples of queries from PHP using file_get_contents... I need them. Thanks!

Try url encoding the query portion of the url.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.