0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 52.14.195.185


Current Path : /var/www/html/msruasapi/src/
Upload File :
Current File : /var/www/html/msruasapi/src/genToken.php

<?php

function getToken($client_id,$client_secret,$username,$password,$grant_type)
{ 
	
    $data = array(
        'client_id'=> "$client_id",
        'client_secret'=> $client_secret,
        'username'=>$username,
        'password'=> $password,
        'grant_type'=> $grant_type
    );

    $ch = curl_init();
    curl_setopt( $ch,CURLOPT_URL, "https://test.salesforce.com/services/oauth2/token"); 
    curl_setopt( $ch,CURLOPT_POST, true );
    curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
    curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, false );
    curl_setopt( $ch,CURLOPT_POSTFIELDS, $data  );
    $result2 = curl_exec($ch);
    //var_dump($result2);
    curl_close( $ch );
    return $result2;
}

?>