<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using PHP SDK to filter fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-PHP-SDK-to-filter-fields/m-p/144595#M40262</link>
    <description>&lt;P&gt;You can solve this by simply adjusting your Splunk Search to return only the fields you are interested in by using the &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/SearchReference/Fields"&gt;"fields" command&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Examples :&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=goo | fields field1, field2
index=foo sourcetype=goo | fields - _* | fields + field1, field2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let Splunk do the work for you.&lt;/P&gt;</description>
    <pubDate>Sun, 17 Nov 2013 09:32:04 GMT</pubDate>
    <dc:creator>Damien_Dallimor</dc:creator>
    <dc:date>2013-11-17T09:32:04Z</dc:date>
    <item>
      <title>Using PHP SDK to filter fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-PHP-SDK-to-filter-fields/m-p/144594#M40261</link>
      <description>&lt;P&gt;Hello I am currently using this code to return a search but its giving me all the fields and I only want certain ones.  I was hoping I could pass parameters in somewhere and filter them but can't figure this out.  Any help&lt;/P&gt;

&lt;P&gt;$job = $service-&amp;gt;getJobs()-&amp;gt;create($search, array('rf' =&amp;gt; '_time'));&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$results = $job-&amp;gt;getResults();

foreach ($results as $result)
{
    if ($result instanceof Splunk_ResultsFieldOrder)
    {
        // Process the field order
        printf ("FIELDS: " . implode(',', $result-&amp;gt;getFieldNames()) . "\r\n");
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Nov 2013 17:22:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-PHP-SDK-to-filter-fields/m-p/144594#M40261</guid>
      <dc:creator>EricLloyd79</dc:creator>
      <dc:date>2013-11-15T17:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using PHP SDK to filter fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-PHP-SDK-to-filter-fields/m-p/144595#M40262</link>
      <description>&lt;P&gt;You can solve this by simply adjusting your Splunk Search to return only the fields you are interested in by using the &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/SearchReference/Fields"&gt;"fields" command&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Examples :&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=goo | fields field1, field2
index=foo sourcetype=goo | fields - _* | fields + field1, field2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let Splunk do the work for you.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2013 09:32:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-PHP-SDK-to-filter-fields/m-p/144595#M40262</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2013-11-17T09:32:04Z</dc:date>
    </item>
  </channel>
</rss>

