diff --git a/README.md b/README.md index 017988d..04eec4e 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,13 @@ First configure and create a SDK client ```php use FriendlyCaptcha\SDK\{Client, ClientConfig} -$config = new \FriendlyCaptcha\SDK\ClientConfig(); +$config = new ClientConfig(); $config->setAPIKey("")->setSitekey(""); // You can also specify which endpoint to use, for example `"global"` or `"eu"`. // $config->setEndpoint("eu") -$captchaClient = new \FriendlyCaptcha\SDK\Client() +$captchaClient = new Client($config) ``` Then use it in the endpoint you want to protect @@ -78,6 +78,9 @@ php bin/composer-setup.php --install-dir=bin --2.2 LTS ```shell bin/composer.phar install + +# Include the autoload file in your code +require __DIR__ . '/vendor/autoload.php'; ``` ### Run the tests @@ -88,7 +91,9 @@ First download the [friendly-captcha-sdk-testserver](https://github.com/Friendly # Run the friendly-captcha-sdk-testserver ./friendly-captcha-sdk-testserver serve ``` + Then open a new terminal, and run the following + ```shell # Generate the autoload files ./bin/composer.phar dump