TextRazor / textrazor-php

PHP SDK for the TextRazor Text Analytics API
MIT License
21 stars 10 forks source link

Getting Started example errors [update suggestion] #4

Closed leotm closed 8 years ago

leotm commented 8 years ago

Problem seems to be: $textrazor = new TextRazor($YOUR_API_KEY); Throwing: TextRazor Error: Invalid API key

Works when updated to: TextRazorSettings::setApiKey($YOUR_API_KEY); As per the docs.

Also had to add TextRazorSettings::setEnableEncryption(false); To prevent the: CURL Error Code:60

crayston commented 8 years ago

Thanks for spotting this! I've merged your PR for the first point and made a note to clarify your second in the documentation. We don't want to encourage disabling of encryption as a default, it's usually possible to fix this error with a certificate bundle like the one at http://stackoverflow.com/questions/21114371/php-curl-error-code-60