3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime(); $url = "https://api.uds.app/partner/v2/settings"; $uuid_v4 = 'UUID'; //generate universally unique identifier version 4 (RFC 4122) $companyId = 123; //set ID of your company $apiKey = 'ZDk1MmE5NzMtODcxNi00YzIwLTllZDMtN2ZjM2NjOGI2YTMz'; //set company apikey // Create a stream $opts = array( 'http' => array( 'method' => 'GET', 'header' => "Accept: application/json\r\n" . "Accept-Charset: utf-8\r\n" . "Authorization: Basic ". base64_encode("$companyId:$apiKey")."\r\n" . "X-Origin-Request-Id: ".$uuid_v4."\r\n" . "X-Timestamp: ".$date->format(DateTime::ATOM) ) ); $context = stream_context_create($opts); $result = file_get_contents($url, false, $context); echo $result;

preferences:
30.66 ms | 406 KiB | 5 Q