<?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 using checkpoint management api web service with php in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/using-checkpoint-management-api-web-service-with-php/m-p/33542#M2070</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;has anybody some code examples how to use web service api with php. I think a good way is to use php cURL but i don't have a clue how to start. I think that &lt;A href="https://community.checkpoint.com/migrated-users/43143"&gt;Ekta Siwani&lt;/A&gt;‌ was using php with api. &lt;A href="https://community.checkpoint.com/t5/tag/php/tg-p"&gt;&lt;/A&gt; &lt;A href="https://community.checkpoint.com/t5/tag/webservice/tg-p"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Felix&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jun 2018 13:36:22 GMT</pubDate>
    <dc:creator>Felix_Hoffmann1</dc:creator>
    <dc:date>2018-06-22T13:36:22Z</dc:date>
    <item>
      <title>using checkpoint management api web service with php</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/using-checkpoint-management-api-web-service-with-php/m-p/33542#M2070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;has anybody some code examples how to use web service api with php. I think a good way is to use php cURL but i don't have a clue how to start. I think that &lt;A href="https://community.checkpoint.com/migrated-users/43143"&gt;Ekta Siwani&lt;/A&gt;‌ was using php with api. &lt;A href="https://community.checkpoint.com/t5/tag/php/tg-p"&gt;&lt;/A&gt; &lt;A href="https://community.checkpoint.com/t5/tag/webservice/tg-p"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Felix&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 13:36:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/using-checkpoint-management-api-web-service-with-php/m-p/33542#M2070</guid>
      <dc:creator>Felix_Hoffmann1</dc:creator>
      <dc:date>2018-06-22T13:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: using checkpoint management api web service with php</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/using-checkpoint-management-api-web-service-with-php/m-p/33543#M2071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't seen many code examples with PHP.&lt;/P&gt;&lt;P&gt;We do have one with Python, though: &lt;A href="https://community.checkpoint.com/docs/DOC-2261"&gt;CPAPI - Web API Tool&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 18:35:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/using-checkpoint-management-api-web-service-with-php/m-p/33543#M2071</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-06-22T18:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: using checkpoint management api web service with php</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/using-checkpoint-management-api-web-service-with-php/m-p/33544#M2072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use PHP, post method, use cURL get request/response from json and display the error.&lt;/P&gt;&lt;P&gt;Do not verify the peer and verify host otherwise it will give the SSL error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample code:&lt;/P&gt;&lt;P&gt;&amp;lt;?php&lt;/P&gt;&lt;P&gt;$curl = curl_init();&lt;/P&gt;&lt;P&gt;curl_setopt_array($curl, array(&lt;BR /&gt;&lt;SPAN&gt; CURLOPT_URL =&amp;gt; "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://Mgmt_IP/web_api/login" rel="nofollow"&gt;https://Mgmt_IP/web_api/login&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; CURLOPT_RETURNTRANSFER =&amp;gt; true,&lt;BR /&gt; CURLOPT_ENCODING =&amp;gt; "",&lt;BR /&gt; CURLOPT_MAXREDIRS =&amp;gt; 10,&lt;BR /&gt; CURLOPT_TIMEOUT =&amp;gt; 30,&lt;BR /&gt; CURLOPT_HTTP_VERSION =&amp;gt; CURL_HTTP_VERSION_1_1,&lt;BR /&gt; CURLOPT_CUSTOMREQUEST =&amp;gt; "POST",&lt;/P&gt;&lt;P&gt;CURLOPT_SSL_VERIFYPEER =&amp;gt; false,&lt;BR /&gt; CURLOPT_SSL_VERIFYHOST =&amp;gt; false,&lt;BR /&gt; CURLOPT_POSTFIELDS =&amp;gt; "{\r\n \"user\" : \"admin\",\r\n \"password\" : \"#@$1@#\"\r\n}",&lt;BR /&gt; CURLOPT_HTTPHEADER =&amp;gt; array(&lt;BR /&gt; "Cache-Control: no-cache",&lt;BR /&gt; "Content-Type: application/json",&lt;BR /&gt;),&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;$response = curl_exec($curl);&lt;BR /&gt;$err = curl_error($curl);&lt;/P&gt;&lt;P&gt;curl_close($curl);&lt;/P&gt;&lt;P&gt;if ($err) {&lt;BR /&gt; echo "cURL Error #:" . $err;&lt;BR /&gt;} else {&lt;BR /&gt; echo $response;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 21:46:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/using-checkpoint-management-api-web-service-with-php/m-p/33544#M2072</guid>
      <dc:creator>VENKAT_S_P</dc:creator>
      <dc:date>2018-06-22T21:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: using checkpoint management api web service with php</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/using-checkpoint-management-api-web-service-with-php/m-p/33545#M2073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you &lt;A href="https://community.checkpoint.com/migrated-users/46392"&gt;VENKAT S P&lt;/A&gt;, exactly what I was looking for!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jun 2018 07:49:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/using-checkpoint-management-api-web-service-with-php/m-p/33545#M2073</guid>
      <dc:creator>Felix_Hoffmann1</dc:creator>
      <dc:date>2018-06-23T07:49:12Z</dc:date>
    </item>
  </channel>
</rss>

