title: How to get reports from Commision Junction API - PHP
body: <p>Commision Junction is the name of an affiliate company. I am not familiar with SOAP, WSDL and with web services in general, but wanted to quickly test the data coming back from their affiliate api. Cannot make it work though. They provide a page for their <a href="http://wiki.affiliatewindow.com/index.php/Advertiser_Service_API" rel="nofollow">API</a></p>
  
  <p>I tried smtg like:</p>
  
  <pre><code>public function testCJApi() {
  
      $url = "http://" . $this-&gt;user . ":" . $this-&gt;password . "@datatransfer.cj.com/datatransfer/files/" . $this-&gt;account . "/outgoing/commission_report.csv";
  
      $xml = simplexml_load_file($url);
  
      if (isset($xml)) {
          return ($xml
              ? $this-&gt;formatJsonReturn($xml, array("txt"=&gt;"CJ Results OK","code"=&gt;""))
              : $this-&gt;formatJsonReturn("", array("txt"=&gt;"CJ Results Empty","code"=&gt;""))
          );
      }
  }
  </code></pre>
  
  <p>but it didn't give me any results. I just need to quickly test the data coming back.
  The API link they provide is 
      <a href="http://api.affiliatewindow.com/v4/MerchantService?wsdl" rel="nofollow">http://api.affiliatewindow.com/v4/MerchantService?wsdl</a>.</p>