1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <title>CURLOPT_REFERER man page</title>
5 <meta name="generator" content="roffit">
6 <STYLE type="text/css">
12 P.level0, pre.level0 {
16 P.level1, pre.level1 {
20 P.level2, pre.level2 {
37 background-color: #e0e0e0;
43 font-family: monospace;
53 <p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
54 <p class="level0">CURLOPT_REFERER - set the HTTP referer header <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
55 <p class="level0">#include <curl/curl.h>
56 <p class="level0">CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REFERER, char *where); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
57 <p class="level0">Pass a pointer to a zero terminated string as parameter. It will be used to set the Referer: header in the http request sent to the remote server. This can be used to fool servers or scripts. You can also set any custom header with <a Class="emphasis" href="./CURLOPT_HTTPHEADER.html">CURLOPT_HTTPHEADER</a>. <a name="DEFAULT"></a><h2 class="nroffsh">DEFAULT</h2>
58 <p class="level0">NULL <a name="PROTOCOLS"></a><h2 class="nroffsh">PROTOCOLS</h2>
59 <p class="level0">HTTP <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
60 <p class="level0"><pre class="level0">
61 CURL *curl = curl_easy_init();
63 curl_easy_setopt(curl, CURLOPT_URL, "<a href="http://example.com">http://example.com</a>");
65 /* tell it where we found the link to this place */
66 curl_easy_setopt(curl, CURLOPT_REFERER, "<a href="http://example.com/aboutme.html">http://example.com/aboutme.html</a>");
68 curl_easy_perform(curl);
72 <p class="level0"><a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
73 <p class="level0">If built with HTTP support <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
74 <p class="level0">Returns CURLE_OK if HTTP support is enabled, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
75 <p class="level0"><a Class="manpage" href="./CURLOPT_USERAGENT.html">CURLOPT_USERAGENT</a>, <a Class="manpage" href="./CURLOPT_HTTPHEADER.html">CURLOPT_HTTPHEADER</a>, <span Class="manpage"> </span> <p class="roffit">
76 This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.