title: SoapClient + PHP + Sharepoint + Getting images from a list OR GetItemsByIds
body: <p>I am using SoapClient to pull data out of a sharepoint list. If its a normal text field it works fine and gives me the image. I can even attach the image to the individual list elements and link it into another field and get the image that way. The problem with that is it asks me to log in to my sharepoint account whenever I access the page, which obviously a normal user of my site will not be able to do.</p>
  
  <p>First, if there is a way around this, that will be a sufficient answer because that is my ideal way of doing it.</p>
  
  <p>However, if the better way is to make a picture gallery and then pull the pictures from there then that isn't a problem.</p>
  
  <p>Basically what I need to know is how to use the Imaging library and maybe the GetItemsByIds method? I am very new to soap and sharepoint in general so I appologize for what may be trivial questions but I really need to know how to do this and I can find no resource on the internet that explains what I need to know (if there is one, link it!). Keep in mind, I have to do this in PHP.</p>
  
  <p>Here is some code that I use to pull the list data:</p>
  
  <pre><code>&lt;?php
    $authParams = array(
  
    'login' =&gt; 'username',
    'password' =&gt; 'pass'
  );
  
  $listName = "{GUID}";
  $rowLimit = '500';
  $wsdl = "list.wsdl";
  $soapClient = new SoapClient($wsdl, $authParams);
  
  $params = array(
    'listName' =&gt; $listName,
    'rowLimit' =&gt; $rowLimit;
  );
  
  echo file_get_contents($wsdl, FILE_TEXT, stream_context_create(array('http' =&gt; array('timeout' =&gt; 1))), 0, 1);
  
  $rawXMLresponse = null;
  try{
      $rawXMLresponse = $soapClient-&gt;GetListItems($params)-&gt;GetListItemsResult-&gt;any;
  }
  catch(SoapFault $fault){
      echo 'Fault code: '.$fault-&gt;faultcode;
      echo 'Fault string: '.$fault-&gt;faultstring;
  }
  echo '&lt;pre&gt;' . $rawXMLresponse . '&lt;/pre&gt;';
  
  $dom = new DOMDocument();
  $dom-&gt;loadXML($rawXMLresponse);
  $results = $dom-&gt;getElementsByTagNameNS("#RowsetSchema", "*");
  ?&gt;
  
  //do the useful thing
  
  &lt;?php
  unset($soapClient);
  ?&gt;
  </code></pre>