Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

docs(backend): Add PHP backend example #401

Merged
merged 4 commits into from
May 25, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/source/documentation.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,22 @@ This position is an array of two numbers, representing the lattitude and the lon
</tbody>
</table>

### Backend

You can also query the Places API from your backend, here is an example with our [PHP API Client](https://github.com/algolia/algoliasearch-client-php). It requires a registered [Places account](https://www.algolia.com/users/sign_up/places).

```php
<?php
$appId = 'YOUR_PLACES_APP_ID';
$apiKey = 'YOUR_PLACES_API_KEY';

$client = new \AlgoliaSearch\Client($appId, $apiKey);
$places = $client->initPlaces($appId, $apiKey);

$result = $places->search('Paris');
var_dump($result);
```

### REST API

Behind the places.js the JavaScript library lies a complete REST API. Read the underlying [REST API documentation](rest.html).
Expand Down