Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('display_errors', 1);
- ini_set('display_startup_errors', 1);
- error_reporting(E_ALL);
- session_start();
- require('classes/cvent.class.php');
- $account = 'PARTCA001';
- $username = 'PARTCA001Api';
- $password = 'S8COcsZJSwt';
- $prod = 'https://api.cvent.com/soap/V200611.ASMX?wsdl';
- // login to API
- $client = new CventClient();
- $client->Login($account,$username,$password);
- // get Updated Events Ids
- // $StartDate - is the date of last cron run, for testing return data for last 2 years
- $StartDate = date('Y-m-d', strtotime('-2 year')).'T00:00:00';
- $newEvents = $client->GetUpdated($StartDate);
- if(!empty($newEvents->GetUpdatedResult))
- {
- // get all Event Ids's data
- $eventIds = $newEvents->GetUpdatedResult;
- $eventDatas = $client->GetEventById($eventIds->Id);
- if(!empty($eventDatas->RetrieveResult->CvObject))
- {
- echo "<pre>";
- var_dump($eventDatas->RetrieveResult->CvObject);
- echo "</pre>";
- }
- }
- else
- {
- // nothing to update
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement