<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Match ETag</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.http-get-request-headers.html">http_get_request_headers</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.http-match-modified.html">http_match_modified</a></div> <div class="up"><a href="ref.http.html">HTTP Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.http-match-etag" class="refentry"> <div class="refnamediv"> <h1 class="refname">http_match_etag</h1> <p class="verinfo">(PECL pecl_http >= 0.1.0)</p><p class="refpurpose"><span class="refname">http_match_etag</span> — <span class="dc-title">Match ETag</span></p> </div> <div class="refsect1 description" id="refsect1-function.http-match-etag-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>http_match_etag</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$etag</code></span> [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$for_range</code><span class="initializer"> = false</span></span> ] )</div> <p class="para rdfs-comment"> Matches the given <em>ETag</em> against the clients <em>If-Match</em> resp. <em>If-None-Match</em> HTTP headers. </p> </div> <div class="refsect1 parameters" id="refsect1-function.http-match-etag-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">etag</code></em></span> <dd> <p class="para"> the <em>ETag</em> to match </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">for_range</code></em></span> <dd> <p class="para"> if set to <strong><code>TRUE</code></strong>, the header usually used to validate HTTP ranges will be checked </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.http-match-etag-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> if <em>ETag</em> matches or the header contained the asterisk ("*"), else <strong><code>FALSE</code></strong>. </p> </div> <div class="refsect1 seealso" id="refsect1-function.http-match-etag-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><strong>http_match_last_modified()</strong></span></li> <li class="member"> <span class="function"><a href="function.http-match-request-header.html" class="function" rel="rdfs-seeAlso">http_match_request_header()</a> - Match any header</span></li> <li class="member"> <span class="function"><a href="function.http-cache-etag.html" class="function" rel="rdfs-seeAlso">http_cache_etag()</a> - Caching by ETag</span></li> <li class="member"> <span class="function"><a href="function.http-cache-last-modified.html" class="function" rel="rdfs-seeAlso">http_cache_last_modified()</a> - Caching by last modification</span></li> <li class="member"> <span class="function"><a href="function.ob-etaghandler.html" class="function" rel="rdfs-seeAlso">ob_etaghandler()</a> - ETag output handler</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.http-get-request-headers.html">http_get_request_headers</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.http-match-modified.html">http_match_modified</a></div> <div class="up"><a href="ref.http.html">HTTP Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>