PHP and Web API

Good Afternoon

We have a new web developer who is creating a new signup form for one of our consortium partners websites.  They currently work in PHP and being a .net person i have no idea how PHP works (tried it once but never again!).  Does anyone have any examples of how to get PHP to connect to the web API and what method they have used to consume the XML?  If you could that would be a life saver!

Thanks

Nick

Parents
  • Hi Nick,

    Using PHP to connect to the Tessitura web API is very simple.
    Handling the XML is easy, too. Here's an example using GetLocalData:



    /* Open a connection to the SOAP server */
    $client = new SoapClient("https://webapi.yourdomain.org/Tessitura_API/
    Tessitura.asmx?WSDL");

    /* Put method parameters in an array */
    $params = array("SessionKey"=>$session, "LocalDataTableIndex"=>1,
    "RetrievalKey"=>$customer);

    /* Get response from SOAP server */
    $response = $client->GetLocalData($params);

    /* Parse the results into an XML object */
    $XML = simplexml_load_string($response->GetLocalDataResult->any);

    /* See what you've got */
    print_r($XML);

    ?>

    Obviously you'll need to add in some error checking, etc. But this
    should be able to get you started. You can find good documentation on
    these functions at www.php.net. (http://us.php.net/manual/en/
    book.soap.php)

    Let me know if you have anymore questions.

    -Morgan
  • Nice one thanks.  I will pass this info on to our developers.

    I really don't get PHP so very useful!

    Thanks

    Nick

  • Hi Nick,

    We have just had a new site developed in PHP that uses the Tessitura API (www.abbeytheatre.ie).

    Our development company used a PHP client called "Zend" that I gather took care of all the SOAP interaction with the Tessitura API and has built in functionality for SOAP compression.

    I'm afraid I don't have any more detail on this but hope it is of some use to you.

    cheers,

    Dara

Reply
  • Hi Nick,

    We have just had a new site developed in PHP that uses the Tessitura API (www.abbeytheatre.ie).

    Our development company used a PHP client called "Zend" that I gather took care of all the SOAP interaction with the Tessitura API and has built in functionality for SOAP compression.

    I'm afraid I don't have any more detail on this but hope it is of some use to you.

    cheers,

    Dara

Children