3v4l.org

run code in 300+ PHP versions simultaneously
<?php $address = 'https://demo45-pl.yourtechnicaldomain.com/customer-api/?gate=Authenticate/authenticate/7/json'; // SHA1 ile sistem anahtarını oluştur $hashedKey = sha1(date('Ymd') . sha1('YOUR_KEY')); $request = array( "authenticate" => array( "systemKey" => $hashedKey, "systemLogin" => "systemLogin" ) ); // JSON formatına çevir $request_json = json_encode($request); // HTTP isteği için header ayarları $options = array( 'http' => array( 'header' => "Content-Type: application/json\r\n" . "Accept: application/json\r\n", 'method' => 'POST', 'content' => $request_json, 'ignore_errors' => true // Hata kodlarını da oku ) ); $context = stream_context_create($options); $response = file_get_contents($address, false, $context); if ($response === FALSE) { die('Hata: Sunucuya bağlanılamadı.'); } // Sonucu ekrana yazdır echo "Response:\n"; echo $response;
Output for 8.1.32, 8.2.0 - 8.2.28, 8.3.0 - 8.3.19, 8.4.1 - 8.4.5
Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/kTcA9 on line 30 Warning: file_get_contents(): open_basedir restriction in effect. File(https://demo45-pl.yourtechnicaldomain.com/customer-api/?gate=Authenticate/authenticate/7/json) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kTcA9 on line 30 Warning: file_get_contents(https://demo45-pl.yourtechnicaldomain.com/customer-api/?gate=Authenticate/authenticate/7/json): Failed to open stream: Operation not permitted in /in/kTcA9 on line 30 Hata: Sunucuya bağlanılamadı.

preferences:
55.91 ms | 408 KiB | 5 Q