• 21-12-2022, 17:12:02
    #1
    merhaba arkadaşlar php ile kullandığımız bir scripte bir kod alıp giriyoruz günde 1 veya 2 defa. Ben bunu otomatik olarak çekmeye çalıştığımda secret key diye bir kod gerekiyor bu kodu nasıl bulabilirim veya farklı yoldan nasıl çekebilirim kodları. Çekmemiz gereken kodlar x_signature ve x_epoch_seconds; x epoch second o andaki güncel zaman olarak çekiliyor ama x signature çekilmiyor

    $secret_key = 'your-secret-key';
    $current_time = time();
    $data_to_sign = "$productId-$current_time-$secret_key";
    $x_signature = hash('sha256', $data_to_sign);
    $x_epoch_seconds = $current_time;

    // Set HTTP headers with the calculated values
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "Host: api.dolap.com",
    "Access-Token: $token",
    "Appplatform: android",
    "Appversion: 280",
    "Content-Type: application/json",
    "Categorygroup: WOMAN",
    "X-Signature: $x_signature",
    "X-Epoch-Seconds: $x_epoch_seconds",
    "Content-Length: 0",
    "User-Agent: okhttp/4.9.1"
    ));
  • 21-12-2022, 17:19:38
    #2
    Dolap api bilmiyorum ama $data_to_sign ürün idsi, güncel zaman ve gizli anahtarınızdan oluşuyor. Üçünü birleştirip sha256 ile şifreliyor ve cURL yardımı ile header'a ekliyor kod

    Araştırıp dönüş yapacağım
  • 21-12-2022, 17:24:49
    #3
    Ne API dökümanına ne de başka bir bilgiye ulaşabildim hocam dolap hakkında @Smtt;
  • 21-12-2022, 19:44:50
    #4
    Mağaza falan mısınız, sanırım üyelikte API ile alakalı bir şey yok gibi.
    Bende herhangi bir örneğe pek rastlamadım?
    Ama sağlayıcı var, api.dolap.com cevap veriyor

    https://github.com/dolap-tech