mlntn / fpl-api

MIT License
6 stars 1 forks source link

php version #1

Open thesaltdog opened 8 years ago

thesaltdog commented 8 years ago

Hi, Do you know if this works with php 5?

I currently get this error when running the example from readme:

PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Error creating resource: [message] fopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

mlntn commented 8 years ago

Which version of PHP 5? I want to test, but it's probably fixable by getting a proper CA cert setup with PHP (like this one: https://curl.haxx.se/docs/caextract.html)

thesaltdog commented 8 years ago

thanks, it php version 5.5.9

I'll have a go with the CA cert setup, I fully expect it's something I'm doing as I'm a complete newb, but very keen to get this working.

mlntn commented 8 years ago

PHP 5.5.34 works on my Macbook Pro. I'm guessing it will be fixed by the CA cert. You can set cacert={path to cacert.pem} in your php.ini file.

There are some things that the API will fail on because: 1) It has been 2 years since I've worked on this and FPL has changed some of their code and 2) because the season is over and the transfers page isn't available (there was a lot of info there). If you want to get it working, I'd be happy to accept pull requests. I may get a chance to work on it sometime, but it's going to be tough to get it fully working without the transfers page.