snipt

Ctrl+h for KB shortcuts
Notice: Snipt is moving away from free accounts on May 1st, 2014. Read more about the transition here.
#53893

Bash

Get response headers from POST request with curl

curl -s -d 'test=test' -D- www.google.com -o/dev/null
https://snipt.net/embed/ff9964a6872571066ed5cc4c13f1674a/
https://snipt.net/raw/ff9964a6872571066ed5cc4c13f1674a/
ff9964a6872571066ed5cc4c13f1674a
bash
Bash
1
2014-04-23T12:37:20
True
False
Jan 17, 2013 at 10:26 AM
/api/public/snipt/53893/
get-response-headers-from-post-request-with-curl
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>curl -s -d <span class="s1">&#39;test=test&#39;</span> -D- www.google.com -o/dev/null </span></pre></div> </td></tr></table>
bash, curl, headers, post
#52152

PHP

Excluir current post del query

'post__not_in' => array( $post->ID )
https://snipt.net/embed/5ec4e40e664d6057d2185cc9e3a17c8e/
https://snipt.net/raw/5ec4e40e664d6057d2185cc9e3a17c8e/
5ec4e40e664d6057d2185cc9e3a17c8e
php
PHP
1
2014-04-17T09:40:47
True
False
Dec 20, 2012 at 02:46 PM
/api/public/snipt/52152/
excluir-current-post-del-query
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="x">&#39;post__not_in&#39; =&gt; array( $post-&gt;ID )</span> </span></pre></div> </td></tr></table>
current, post, query, wordpress