Hi Dumitru,
I do not know PHP, but I tried to run your script with sparqllib.php and
got success. Have you already installed php5-curl package?
One more thing: In your foreach loop, you must be use *$fields* instead of *
$fileds*
Regards,
2013/6/24 Dumitru Valeriu Voicu <[email protected]>
> I am trying send a query your DBpedia's endpoint http://dbpedia.org/sparql via
> a php script, with no succes unfortunately. This is the script:
>
> <?php
> require_once('sparqllib.php');
> $db = sparql_connect('http://dbpedia.org/sparql');
> $query = "SELECT ?film
> WHERE { ?film <http://purl.org/dc/terms/subject> <
> http://dbpedia.org/resource/Category:French_films> }";
>
> $result = sparql_query($query);
> $fields = sparql_field_array($result);
> while($row = sparql_fetch_array($result))
> {
> foreach($fileds as $field)
> {
> print"$row[$field] \n";
> }
> }
> ?>
>
>
> It gives me an HTTP 500 error. I have a school project in a few days. If
> you can give an advice I would be really gratefull. I have to do the
> project in PHP only.
>
> Thank you very much.
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Dbpedia-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dbpedia-developers
>
>
--
Atenciosamente,
Sandro Athaide Coelho
Graduando em Ciência da Computação - UFJF
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Dbpedia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-developers