<?php

    $developerKey = "008206845fbe831920c1a403e8221bdd74d19dc26ef3051e8d40e369d2f1c25a5876cb3598bd24625401de05895470f9cd9ec770c5076bb8fd7fafdbdd2231051d/74c1255c53d5a45aa586817b9025355610637893e7e450eac5b96eecdbe988f55cd32e3d6ff07df9354818be4c14372e56d87a1b7957c2e0a6343db512557401";

    $ini = ini_set("soap.wsdl_cache_enabled","0");

    try {

    $client = new SoapClient("https://pubcommission.api.cj.com/wsdl/version2/publisherCommissionServiceV2.wsdl", array('trace'=> true));

        //Enter the request parameters for publisherCommissionSearch below.
        //For detailed usage of the parameter values, please refer to CJ Web Services online documentation

        $results = $client->findPublisherCommissions(array(
                                            "developerKey" => $developerKey,
                                            "date" => '10/12/2008',
                                            "dateType" => 'event',
                                            "advertiserIds" => '',
                                            "websiteIds" => '',
                                            "actionStatus" => 'closed',
                                            "actionTypes" => 'sale',
                                            "adIds" => '',
                                            "countries" => 'US',
                                     		"correctionStatus" => 'all',
                                            "sortBy" => '',
                                            "sortOrder" => 'asc',));

        // The entire response structure will be printed in the next line
        print_r($results);

    } catch (Exception $e){
        echo "There was an error with your request or the service is unavailable.\n";
        print_r ($e);
    }
?>