CURL.SetOptionIPResolve
-----------------------

Allows an application to select what kind of IP addresses to use when resolving host names.

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

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

**MBS**( **"CURL.SetOptionIPResolve";** /\* Allows an application to select what kind of IP addresses to use when resolving host names. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* Whether to use IPv4 and/or IPv6.e.g. 2 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | Whether to use IPv4 and/or IPv6. | 2 |

### Result

Returns "OK" on success.

### Description

Allows an application to select what kind of IP addresses to use when resolving host names.   
This is only interesting when using host names that resolve addresses using more than one version of IP. The allowed values are:  
  
| IP Resolve Default | 0 | Default, resolves addresses to all IP versions that your system allows. |
|---|--:|---|
| IP Resolve v4 | 1 | Resolve to IPv4 addresses. |
| IP Resolve v6 | 2 | Resolve to IPv6 addresses. |

See also [IPRESOLVE](https://curl.haxx.se/libcurl/c/CURLOPT_IPRESOLVE.html) option in CURL manual.

### See also

- [CURL.GetOptionResolve](CURLGetOptionResolve.md)
- [CURL.SetOptionCRLFile](CURLSetOptionCRLFile.md)
- [CURL.SetOptionInterface](CURLSetOptionInterface.md)
- [CURL.SetOptionPreQuote](CURLSetOptionPreQuote.md)
- [CURL.SetOptionResolve](CURLSetOptionResolve.md)
- [CURL.SetOptionTimeValue](CURLSetOptionTimeValue.md)

### Blog Entries

- [Translating Insert from URL options for CURL to MBS Plugin calls](https://www.mbsplugins.de/archive/2020-12-14/Translating_Insert_from_URL_op/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 25th November 2017

  
[CURL.SetOptionHeaderOptions](CURLSetOptionHeaderOptions.md) - [CURL.SetOptionIgnoreContentLength](CURLSetOptionIgnoreContentLength.md)

[HTML Version](CURLSetOptionIPResolve.shtml)