Skip to content

Instantly share code, notes, and snippets.

@nolim1t
Created June 9, 2009 12:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nolim1t/126455 to your computer and use it in GitHub Desktop.
Save nolim1t/126455 to your computer and use it in GitHub Desktop.
Quality Center OTA via PHP
<?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.";
?>
@sandeepthukral
Copy link

The gist works. Great! Thanks!!
Now the question is, what call can I do with the connection?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment