php - 在 SMTP 连接之前更改服务器 IP
问题描述
我尝试使用 SMTP PHP 验证电子邮件。现在它工作正常。我想在连接到 SMTP 之前更改我的服务器 IP。现在默认情况下,它需要我的主 IP 运行,但我想在服务器的辅助 IP 中运行。如何使用 PHP 更改服务器 IP?
当前代码:
if ($this->sock = fsockopen($host, $this->port, $errno, $errstr, (float) $timeout)) {
stream_set_timeout($this->sock, $this->max_read_time);
break;
}
解决方案
推荐阅读
- c# - Protobuf.net - 需要序列化的类的所有字段
- excel - 在一串数字中搜索数字:MS Excel
- angular - 安装 angularx-social-login 时出错
- xml - DTD - 是否可以一次声明多个元素的属性
- gcloud - gsutil ConfigParser.ParsingError:文件包含解析错误
- vaticle-typedb - Grakn & Graql 中是否有任何复杂的应用示例?
- java - 如何使用 Vaadin 标签从另一个类打印 arrayList?
- java - 将几个 JPA 注释组合成一个
- java - 文件路径(变量类型)的处理/Java 文件计数问题
- sql - 具有多个根的 Oracle 分层查询将子项作为根返回