[PHP] Can't get Access Token

I think i resolved the issue. I tried to return the error that CURL was giving and it said: “unable to get local issuer certificate”

A quick google search returned that I should add the following params:

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

I did this and now it seems to be working. Maybe I shouldn’t have jumped the gun and made a post about it - I normally only do so as a last resort - but at least if others see it they might benefit from the answer.

–EDIT–
This was a temporary solution that I had when building on a localhost environment without HTTPS. Do not do the above in a live environment - instead make sure your SSL Certificate is up to date. Thanks to BarryCarlyon for the heads up.