File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ There is an [Agent Skill for working with the OpenCage Geocoding API](https://gi
2727
2828## Installation
2929
30+ Requires PHP 8.2 or newer.
31+
3032### With Composer
3133
3234The recommended - and easiest way - to install is via [ Composer] ( https://getcomposer.org/ ) .
@@ -108,8 +110,20 @@ $result = $promise->wait();
108110print $result['results'][0]['formatted'];
109111```
110112
113+ ## Configuration
114+
115+ ### Set a timeout
116+
117+ ``` php
118+ $geocoder = new \OpenCage\Geocoder\Geocoder('YOUR-API-KEY');
119+ $geocoder->setTimeout(5); // seconds, default is 10
120+ $result = $geocoder->geocode('82 Clerkenwell Road, London');
121+ ```
122+
111123### Set a proxy URL
112124
125+ The proxy URL must include a scheme (` http ` , ` https ` , or ` socks5 ` ) and a host.
126+
113127``` php
114128$geocoder = new \OpenCage\Geocoder\Geocoder('YOUR-API-KEY');
115129$geocoder->setProxy('https://proxy.example.com:1234');
You can’t perform that action at this time.
0 commit comments