I need php to extract the data by category from freebase using freebase query language.
For example,
[login to view URL]{%22q1%22:{%22query%22:{%22name%22:%20null,%22name~=%22:%20%22*%22,%22type%22:%20%22/people/person%22,%22nationality%22:%20%22India%22,%22id%22:%20null,%22limit%22:%2010}}}
Here is the sample php code.
$ch = curl_init();
echo "site: $apiendpoint=$jsonquerystr <br>";
$query ="{%22query%22:{%22*%22:[],%22type%22:%22\/film\/film%22,%22initial_release_date%22:%222012%22,%22\/film\/film\/language%22:%22Hindi%20Language%22,%22limit%22:10}";
$q="[login to view URL]{%22q1%22:".$query ."}}";
curl_setopt($ch, CURLOPT_URL, $q);
//curl_setopt($ch, CURLOPT_URL, "$apiendpoint=$jsonquerystr");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$jsonresultstr = curl_exec($ch);
curl_close($ch);
$resultarray = json_decode($jsonresultstr, true); #true:give us the json struct as an array
$filmarray = $resultarray["q1"]["messages"]["result"];
for ($i=0;$i<strlen($resultarray);$i++){
print "$i<br>";
}
use php freebase class [login to view URL]
Script should get data like people data, movie data etc
Sample Freebase queries are
People of Indian Origin
[{
"name": null,
"name~=": "*",
"type": "/people/person",
"nationality": "India",
"id": null,
"limit": 1000
}]
Get All Movies by Year
[{
"name": null,
"name~=": "*",
"type": "/film/film",
"id": null,
"initial_release_date": null,
"initial_release_date<": "1970",
"initial_release_date>=": "1960",
"/film/film/language": "Hindi Language",
"sort": "-initial_release_date",
"limit": 10
}]
The data should be extracted in csv format. Freebase query returns data in json format so it should be converted to csv.
Only freelancer with freebase and php experience should bid. Only serious freelancer.
Once freelancer is selected, there should not be any excuses. So, please bid if you are confident of doing the tasks.
My budget is less than $50
I hope will spare some of your valuable time to visit our sample websites . Please check your PMB & share your queries regarding your esteem project that you have posted on freelancer.com & let us know how soon we can start your project.
thanks & regards
OJ