• 26-05-2021, 21:58:08
    #1
    Aşağıda belirtilen yapının php karşılığı ne olmalı arkadaşlar? Şimdiden teşekkürler.

    curl --request POST \
    --url "https://api.iyspanel.com/dev/oauth/token" \
    --data "grant_type=client_credentials" \
    --data "client_id=<CLIENT_ID>" \
    --data "client_secret=<CLIENT_SECRET>" \
    --header "content-type:application/x-www-form-urlencoded"
  • 26-05-2021, 22:02:18
    #3
    // Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/ 
    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL, 'https://api.iyspanel.com/dev/oauth/token'); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
    curl_setopt($ch, CURLOPT_POST, 1); 
    curl_setopt($ch, CURLOPT_POSTFIELDS, "grant_type=client_credentials&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>"); 
    
    $headers = array(); 
    $headers[] = 'Content-Type: application/x-www-form-urlencoded'; 
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 
    
    $result = curl_exec($ch); 
    if (curl_errno($ch)) {    
    echo 'Error:' . curl_error($ch); 
    } 
    curl_close($ch);
    https://incarnate.github.io/curl-to-php/ bu siteden sonucu alabilirsiniz
  • 26-05-2021, 22:03:36
    #4
    mertkilic0111 adlı üyeden alıntı: mesajı görüntüle
    // Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'https://api.iyspanel.com/dev/oauth/token');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "grant_type=client_credentials&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>");
    
    $headers = array();
    $headers[] = 'Content-Type: application/x-www-form-urlencoded';
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    
    $result = curl_exec($ch);
    if (curl_errno($ch)) {    
    echo 'Error:' . curl_error($ch);
    }
    curl_close($ch);
    https://incarnate.github.io/curl-to-php/ bu siteden sonucu alabilirsiniz
    Vay arkadaş ölüyormuşuz bee ) Teşekkürler arkadaşlar