<?php
/**
 * Created by PhpStorm.
 * User: mamo
 * Date: 02/11/17
 * Time: 16:28
 */
require_once "../config.php";
require_once "../lib/hmac.class.php";

$baseUrl = "https://test.istanze-online.it/iren/test/myapp.html";
$path = "/iren/test/myapp.html";
$params = Array(
    "user"=>"test",
    "section"=>"D&G",
    "activity"=>"33",
    "user_id"=>"Pippo",
    
 );
$hmac=irenHmac::prepareHMacString($path,$params);
$crypt = irenHmac::createHash($hmac);
//$params["section"] = "pippo";
$params["hmac"]= $crypt;
$query = http_build_query($params);
$myframe = sprintf("%s?%s",$baseUrl,$query);
//setcookie("___IREN___HMAC", irenHmac::$secret, time()+3600,"/iren", "test.istanze-online.it");
?>

<html>
<body>
    <div id="myframe" style="width:100%;">
        <iframe src="<?php echo $myframe;?>" style="width:100%;"></iframe>
    </div>
</body>
</html>

