How in PHP to use a specific network interface?

Now looking for a solution, but maybe someone faster prompt.
I need to make outgoing connections executing in php for a specific web application or started via console is done through a separate network interface.
March 12th 20 at 07:56
1 answer
March 12th 20 at 07:58
at the application level is not solved.

Or configure routing, or print the application in a separate virtual reality and cling to the correct interface.
Well, the runlevel script PHP?
I know you can if you use curl to specify the interface. But for example globally for him to change the interface (for example the whole script at runtime) I have not yet found. - Trenton commented on March 12th 20 at 08:01
utility network - provides tools interfaces.
The php interpreter is not required. PHP script network does not work, it relies on the operating system. So at the level of the start of the script php will not work.
Can you send in cgroup )
but I think it will be easier to go to Docker or dev ) - christian_Howe commented on March 12th 20 at 08:04
@Trenton, by the fact that it can not be done on the php level - bernice commented on March 12th 20 at 08:07

Find more questions by tags Computer networksApachePHP