These forums have been archived and are now read-only.
The new forums are live and can be found at https://forums.eveonline.com/
SSO - How to get the access_code with a php curl
$authorization_code = $_REQUEST["code"];$url = "https://login.eveonline.com/oauth/token";$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false); // required as of PHP 5.6.0curl_setopt($ch, CURLOPT_POSTFIELDS, urlencode('grant_type=authorization_code& code='.$authorization_code));curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization: Basic RVByaEI2Y2xMV2xWdkhydQ==', 'Content-type: application/x-www-form-urlencoded', 'Host: login.eveonline.com' ));$result = curl_exec($ch);if($result === false){ echo "curl error: " . curl_error($ch); echo $result;}else{ echo "succes: "; echo $result;}curl_close($ch);
Woo! CSM XI!
Fuzzwork Enterprises
Twitter: @fuzzysteve on Twitter
Developer of EVEmail