Home  >  Q&A  >  body text

PHPcurl, a dedicated network interface

I have a (webserver) server with two network interfaces. The first is a standard interface for a public Internet connection and the other is a virtual VPN network interface.

Now I want to send POST data via curl on other web services inside the VPN network.

How can I say that the php there must use the VPN network interface to call that address?

P粉521697419P粉521697419366 days ago707

reply all(1)I'll reply

  • P粉937382230

    P粉9373822302023-11-09 00:42:58

    Documentation lists CURLOPT_INTERFACE as a configurable option.

    curl_setopt($ch, CURLOPT_INTERFACE, "XXX.XXX.XXX.XXX");

    reply
    0
  • Cancelreply