title: soap api with betfair
body: <p>It's my first time using the SOAP API by BetFair I have created one XML file and one file that will call that file. I am not understanding how can I call this and get an output. I have created the XML file below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Body&gt;
      &lt;login xmlns="http://www.betfair.com/publicapi/v3/BFGlobalService/"&gt;
          &lt;request&gt;
              &lt;locationId xmlns=""&gt;0&lt;/locationId&gt;
              &lt;username xmlns=""&gt;usrname&lt;/username&gt;
              &lt;password xmlns=""&gt;password&lt;/password&gt;
              &lt;productId xmlns=""&gt;18&lt;/productId&gt;            
              &lt;vendorSoftwareId xmlns=""&gt;0&lt;/vendorSoftwareId&gt;
          &lt;/request&gt;
      &lt;/login&gt;
  &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>Now to call this file I have also created one php file to do this. 
  BetFair has given this link for the login api: <a href="https://api.betfair.com/global/v3/BFGlobalService.wsdl" rel="nofollow noreferrer">https://api.betfair.com/global/v3/BFGlobalService.wsdl</a></p>
  
  <pre><code>&lt;?php
      $get_data = file_get_contents("http://pixelonsell.com/dev2/betfair/login.xml");
      $b = html_entity_decode($get_data);
      $data= urlencode($b);
      print_r($data);
      $client = new SoapClient("https://api.betfair.com/global/v3/BFGlobalService.wsdl");
      $result = $client-&gt;LoginReq($data);
  
      print_r($result);
  ?&gt;
  </code></pre>
  
  <p>I don't know why it's not working; can you help me out with this? Thank you in advance.</p>