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"
));