1

From PHP doc the option CURLOPT_INTERFACE description is:

The name of the outgoing network interface to use. This can be an interface name, an IP address or a host name.

What is meant by the outgoing network interface here in terms of computer network?

machineaddict
  • 3,216
  • 8
  • 37
  • 61
Atef
  • 593
  • 1
  • 8
  • 18

1 Answers1

1

See the cURL documentation here:

http://curl.haxx.se/libcurl/c/CURLOPT_INTERFACE.html

Pass a char * as parameter. This sets the interface name to use as outgoing network interface. The name can be an interface name, an IP address, or a host name.

You can use this if your webserver has multiple network interfaces/ip addresses and you must select a specific interface for your request (eg your default gateway might be on your primary network interface but you need a request to go over a secondary interface).

EG You may have a request that needs to traverse a VPN.

Scuzzy
  • 12,186
  • 1
  • 46
  • 46