CURL.GetLocalIP
---------------

Queries local IP.

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

MBS( "CURL.GetLocalIP"; curl ) 

**MBS**( **"CURL.GetLocalIP";** /\* Queries local IP. \*/  
**$curl**) /\* The CURL session handle. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |

### Result

Returns the requested value or nothing on error.

### Description

Queries local IP.  
Get a string holding the local (source) IP address of the most recent connection done with this curl handle.   
This string may be IPv6 if that's enabled.   
### Examples

Query local IP:

 Let(\[  
 curl = MBS ("[CURL.New](CURLNew.md)");  
 // we need to do something  
 r = MBS ("[CURL.SetOptionURL](CURLSetOptionURL.md)"; curl; "https://www.monkeybreadsoftware.de");  
 r = MBS ("[CURL.Perform](CURLPerform.md)"; curl);  
 // now we can get the IP used to connect  
 localIP = MBS ( "CURL.GetLocalIP"; curl );  
 r = MBS ("[CURL.Release](CURLRelease.md)"; curl)\];   
localIP)  
### See also

- [CURL.GetLocalPort](CURLGetLocalPort.md)
- [CURL.New](CURLNew.md)
- [CURL.Perform](CURLPerform.md)
- [CURL.Release](CURLRelease.md)
- [CURL.SetOptionURL](CURLSetOptionURL.md)

### Example Databases

- [CURL/CURL Download Picture](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/CURL%20Download%20Picture.shtml#1ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 22nd June 2026

  
[CURL.GetLastSocket](CURLGetLastSocket.md) - [CURL.GetLocalPort](CURLGetLocalPort.md)

[HTML Version](CURLGetLocalIP.shtml)