Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : cURL



Normal Mode | Print  

 cURL, Does Amppstack support curl (1 Replies, Read 1152 times)
timduongdi123123
Group: Member
Post Group: Newbie
Posts: 1
Status:
Hi, i'm newbie. I want to ask if amppstack supports curl, especially the code below.
$params = [
        'code' => $_GET['code'],
        'client_id' => $google_oauth_client_id,
        'client_secret' => $google_oauth_client_secret,
        'redirect_uri' => $google_oauth_redirect_uri,
        'grant_type' => 'authorization_code'
    ];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https(:/)/accounts(.)google(.)com/o/oauth2/token');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$response = json_decode($response, true);

i want to create login function with google. It runs fine on XAMPP but not AMPPS. $response returns a NULL value.
sorry for my English not good. Tks for support.
IP: --   


Threads
 timduongdi123123   cURL, Does Amppstack support curl (1 Replies, Read 1152 times)
    |--  Brijesh   Hi, Yes AMPPS...   on March 15, 2024, 12:12 pm

« Previous    Next »

Normal Mode | Print  



Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 8, 2024, 10:15 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.036