简体   繁体   English

CURLOPT_INTERFACE无法在php中使用

[英]CURLOPT_INTERFACE not working in php

I am not able to bind to my ip addresses that are set in my network interface 我无法绑定到网络接口中设置的IP地址

The following command works curl --interface 41.141.41.23 https://www.google.com 以下命令适用于curl --interface 41.141.41.23 https://www.google.com

but $toSet[CURLOPT_INTERFACE] = "41.141.41.23 "; 但是$toSet[CURLOPT_INTERFACE] = "41.141.41.23 "; in php doesn't work and throw bind failed with errno 22: Invalid argument 在PHP中无法正常工作,并抛出bind failed with errno 22: Invalid argument

I am sure that $toSet[CURLOPT_INTERFACE] = "41.141.41.23 "; 我确定$toSet[CURLOPT_INTERFACE] = "41.141.41.23 "; is the correct way to use multiple address in my application as i have confirm with the coder and many people are using it the same way as well without any issue 是我在编码器中确认的在我的应用程序中使用多个地址的正确方法,并且许多人也以相同的方式使用它,而没有任何问题

My curl version is : curl 7.19.7 我的curl版本是:curl 7.19.7

“ 41.141.41.23” =>“ 41.141.41.23”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM