Never do curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);

Some people seem to encounter problems in connecting to some of the OpenID providers due to their curl SSL certificate bundle not supporting the particular OP