CURL.SetOptionAutoReferer
-------------------------

Set whether to set automatically the referrer.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionAutoReferer"; curl; Value ) 

**MBS**( **"CURL.SetOptionAutoReferer";** /\* Set whether to set automatically the referrer. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* Whether to automatically set referrer.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | Whether to automatically set referrer. | 1 |

### Result

Returns "OK" on success.

### Description

Set whether to set automatically the referrer.  
Pass a parameter set to 1 to enable this. When enabled, libcurl will automatically set the Referer: field in requests where it follows a Location: redirect.  
See also [AUTOREFERER](https://curl.haxx.se/libcurl/c/CURLOPT_AUTOREFERER.html) option in CURL manual.

### Examples

Turns referrer on:

 MBS ( "CURL.SetOptionAutoReferer"; $curl ; 1 )  
### See also

- [CURL.SetOptionReferer](CURLSetOptionReferer.md)
- [CURL.SetOptionXOAuth2Bearer](CURLSetOptionXOAuth2Bearer.md)

Created 18th August 2014 , last changed 8th December 2016

  
[CURL.SetOptionAppend](CURLSetOptionAppend.md) - [CURL.SetOptionBufferSize](CURLSetOptionBufferSize.md)

[HTML Version](CURLSetOptionAutoReferer.shtml)