PHP code example of thecsea / osticket-php-client
1. Go to this page and download the library: Download thecsea/osticket-php-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
thecsea / osticket-php-client example snippets
use it\thecsea\osticket_php_client\OsticketPhpClient;
use it\thecsea\osticket_php_client\OsticketPhpClientException;
$support = new OsticketPhpClient($url, $apiKey);
try{
$response = $client->newTicket()
->withName('test')
->withEmail('[email protected]')
->withPhone('0123456789')
->withSubject('subject')
->withMessage('message')
->withTopicId('1')
->getData();
print $response;
}catch(OsticketPhpClientException $e){
print $->getMessage();
}