I've recently encountered this problem. I would like to set which connection does apache/php use to connect remote servers (via curl, smtp... etc).
Here's my situation, I have 2 connections on the XAMPP machine, one of them is local connection with no outgoing blockages, the other is external connection with outgoing blockages. When I try to send mail via pear mail (connecting to port 465), when both connection is on, it is blocked. When I disable the external connection which has outgoing blockages, it works, via the first connection.
I know that this could be a minor issue, and could be solved easily by opening a port, port 465. However, I'm not the admin of the network, so I can't do any tweaks. So is there a way to tell apache/php which connection to use for remote connections?