PHPcurl, a dedicated network interface
P粉521697419
P粉521697419 2023-11-08 20:01:46
0
1
801

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粉521697419
P粉521697419

reply all(1)
P粉937382230

Documentation lists CURLOPT_INTERFACE as a configurable option.

curl_setopt($ch, CURLOPT_INTERFACE, "XXX.XXX.XXX.XXX");
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template