1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| <!DOCTYPE html>
<html>
<head>
<title>Application </title>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<?php include ('header.php'); ?>
<div class="div">
<h1 class="titre">history</h1>
<p>
<?php
require ('rkCluster.php');
$API="/api/v1/cluster/me";
$curl = curl_init();
if(!empty($clusterConnect["username"])){
echo $clusterConnect["username"];
}
Else{
echo "la valeur n'existe pas";
}
curl_setopt($curl, CURLOPT_USERPWD, $clusterConnect["username"].":".$clusterConnect["password"]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_URL, [https://]https://.$clusterConnect["ip"].$API);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
return json_decode($result)->version;
?>
</p>
</div>
</body>
<?php include ('footer.php');?>
</html> |
Partager