Created
June 9, 2009 12:34
-
-
Save nolim1t/126455 to your computer and use it in GitHub Desktop.
Quality Center OTA via PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Found this on the web | |
// Requirements: PHP + COM + Win32 (duh) | |
// DISCLAIMER: Found this on the web. Have not tested this yet, but it would come in handy | |
$qcurl =$_GET["qcurl"]; | |
$usr =$_GET["usr"]; | |
$pwd =$_GET["pwd"]; | |
$dmn =$_GET["dmn"]; | |
$prj =$_GET["prj"]; | |
$tdc = new COM("TDApiOle80.TDConnection") or die("Unable to instantiate Quality Center OTA API COM Object"); | |
$tdc->InitConnectionEx($qcurl); | |
$tdc->Login($usr, $pwd); | |
If ($tdc->LoggedIn == 1) | |
echo " | |
Connected"; | |
Else | |
echo "Check the Attributes"; | |
$tdc->Connect($dmn,$prj); | |
If ($tdc->Connected == 1) | |
echo " | |
Logged In : Domain - $dmn | Project :$prj "; | |
//$tsttMgr = $tdc->TestSetTreeManager; | |
//Disconnect from the project | |
If ($tdc->Connected == 1) | |
{ $tdc->Disconnect(); | |
echo " | |
Disconnected"; | |
} | |
//Log off the server | |
If ($tdc->LoggedIn == 1) | |
$tdc->Logout(); | |
//Release the TDConnection object. | |
$tdc->ReleaseConnection(); | |
echo "Released Connection."; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The gist works. Great! Thanks!!
Now the question is, what call can I do with the connection?