PHP Function for get a session using TASK API with IIS

Hello there! I've created a PHP function to help you create a session using TASK API for PHP with IIS. Here is the code: <?php function authenticationMSTR($server, $project, $user, $pass, $documentId, $dashboardMode) { $projectUrl = str_replace(" ","%20",$project); $projectTask = str_replace(" ","+",$project); $username = 'username'; $password = 'password'; $context = stream_context_create(array( 'http' => array( 'header' => "Authorization: …

Using Task API getSessionState with PHP in IIS

Hello there! Today let's talk about how to create a session using PHP with IIS. First, enable Basic Authentication on MicroStrategy Virtual Site in IIS. You just have to use this code: <?php $username = 'username'; $password = 'password'; $context = stream_context_create(array( 'http' => array( 'header' => "Authorization: Basic " . base64_encode("$username:$password") ) )); $url …