Hi Everyone,
Very basic stuff - but was wondering if anyone could give me a hand showing how they are connecting to the Web API and/or using some of the methods using PHP?
Thanks,Caspian
Caspian, Here is an older thread talking about it.
http://www.tessituranetwork.com/Community/forums/p/940/3251.aspx
Are you looking at connecting to the REST API? It's going to be slightly different from the SOAP API (in the thread Jon referenced)
Thanks Jon & Paul. I'm looking at connecting to the SOAP API and have tried the examples from Morgan in that thread with our Test Gateway but unfortunately was not successful!
The cURL is what I use. You can read about it here.http://php.net/manual/en/book.curl.php
Looks something like this (this gets a session key).
<?php
$session = curl_init();curl_setopt ($session, CURLOPT_URL, 'http://SOME_IP_ADDRESS/testapi/tessiturasimpletype.asmx/GetNewSessionKey?sIP=string');curl_setopt($session, CURLOPT_RETURNTRANSFER, 1);curl_setopt ($session, CURLOPT_CONNECTTIMEOUT, 0);$response = curl_exec($session);if(curl_errno($session)){ echo 'Curl error: Unable to obtain session ID ' . curl_error($session);}curl_close($session);
?>
Travis
Thanks Travis! I've managed to connect and run a couple of methods using that.
Cheers,
Caspian
No problem. I am thinking you will probably be asking this next, so here you go. Let me know if I can help out.
http://www.tessituranetwork.com/Community/forums/t/10031.aspx
That's exactly what I needed next! Thanks for your help.