Using TASK API getSessiongState with PHP

Hello there!

If you read the last post  Using TASK API getSessiongState with .net here is a PHP code that does the exact same thing for Tomcat:

<?php

$url = “http://username:password@localhost:8080/MicroStrategy/servlet/taskAdmin?taskId=getSessionState&taskEnv=xml&taskContentType=xml&server=localhost&project=Example01&uid=administrator&pwd=123456“;

 

$xml=simplexml_load_file($url);

foreach($xml->children() as $child) {

foreach($child->children() as $child1) {

$sessionmstr = $child1;

break;

}

}

header(“Location: http://server/Microstrategy/asp/Main.aspx?evt=2048001&src=Main.aspx.2048001&visMode=0&currentViewMedia=2&documentID=7F6C3933429AFFAE5538AFAE113AB6C1&server=server&Project=Tutorial&port=0&share=1&usrSmgr=$sessionmstr “);

?>

That’s it!

Hope it helps!

God bless you!

One thought on “Using TASK API getSessiongState with PHP

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s