PHP Post Data Over VPN

后端 未结 2 1562
借酒劲吻你
借酒劲吻你 2021-01-04 18:37

I need to connect to a webservice which is behind of a VPN via PHP. My server is Debian Linux (Squeeze).

  1. Is it possible to accomplish this via PH
2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-04 19:03

    From PHP point of view, the VPN is just a plain network connection. It does not require additional handling.

    If you want to dynamicaly estabilish a VPN connection, you'll probably need to use exec() and some commandline tool for estabilishing a connection. But as such connection doesn't interfere with normal network communication (as long as it's properly configured, with other subnet ip range), you should estabilish it once and keep it active for PHP and other apps to use.

提交回复
热议问题