File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -294,6 +294,13 @@ service:
294294$client = new Client(42, 'abcdef123456', ['en'], ['host' => 'geolite.info']);
295295```
296296
297+ To call the Sandbox GeoIP2 web service instead of the production GeoIP2 web
298+ service:
299+
300+ ``` php
301+ $client = new Client(42, 'abcdef123456', ['en'], ['host' => 'sandbox.maxmind.com']);
302+ ```
303+
297304After creating the client, you may now call the method corresponding to a
298305specific endpoint with the IP address to look up, e.g.:
299306
@@ -321,7 +328,9 @@ use GeoIp2\WebService\Client;
321328// Replace "42" with your account ID and "license_key" with your license
322329// key. Set the "host" to "geolite.info" in the fourth argument options
323330// array to use the GeoLite2 web service instead of the GeoIP2 web
324- // service.
331+ // service. Set the "host" to "sandbox.maxmind.com" in the fourth argument
332+ // options array to use the Sandbox GeoIP2 web service instead of the
333+ // production GeoIP2 web service.
325334$client = new Client(42, 'abcdef123456');
326335
327336// Replace "city" with the method corresponding to the web service that
Original file line number Diff line number Diff line change @@ -68,7 +68,12 @@ class Client implements ProviderInterface
6868 * * `host` - The host to use when querying the web
6969 * service. To query the GeoLite2 web service
7070 * instead of the GeoIP2 web service, set the
71- * host to `geolite.info`.
71+ * host to `geolite.info`. To query the Sandbox
72+ * GeoIP2 web service instead of the production
73+ * GeoIP2 web service, set the host to
74+ * `sandbox.maxmind.com`. The sandbox allows you to
75+ * experiment with the API without affecting your
76+ * production data.
7277 * * `timeout` - Timeout in seconds.
7378 * * `connectTimeout` - Initial connection timeout in seconds.
7479 * * `proxy` - The HTTP proxy to use. May include a schema, port,
You can’t perform that action at this time.
0 commit comments