We have a handy PHP-based helper class that can facilitate making your API requests. You can download the class at https://api.myeventguru.com/1/php-sdk/
The usage of the class is pretty simple. Include it in your php file, instantiate the class and provide your credentials, then make a necessary API call. See below for an example.
NOTE: If you're using our helper class, you do not need to specify 'timestamp' parameter. It will be automatically added for you by the class itself. Timestamp is only required to be specified explicitly if you're making requests outside of the helper class. For more information, see the article on Authentication.
// make sure you include this required MegAPI class you downloaded from our site
// instantiate your helper class by providing your API and Signature here
// You can obtain your API and Signature in the API section of your profile after you log in
$megAPI = new MegAPI('YOUR_API_KEY_HERE','YOUR_API_SIGNATURE_HERE');
// Specify 'json' as the format. All of our APIs return json encoded data for now
$megAPI->format="json"; // json is the default format
// Specify to decode the returned string into a true JSON object
$megAPI->decode_json = true;
// Create array of parameters to send to the API
// Please refer to the API documentation for exact parameters that a specific API call expects
$params = array(
// Make a request to a specific API endpoint. In this particular example, you are making a GET
// request to /events/company/.
// For a complete list of available methods and calls, please see our API documentation
// NOTE: When making calls via our MegAPI helper, make sure there's no forward slash before API call name
// CORRECT: 'events/company/'
// INCORRECT: '/events/company/'
$results = $megAPI->get('events/company/', $params);