報錯信息如下,郵箱設(shè)置肯定沒問題,因為在別的機器上都正常。就是海外虛擬主機,它意思是它沒有開fsockopen,fsockopen導致服務器被黑。

主機商回復如下:
In PHP, the 'fsockopen' function is used to establish a socket connection to a remote server, allowing your script to communicate directly with another network resource, such as a web server or service, over the internet or a Unix domain socket. This function enables you to send and receive data from the server within your PHP code. However, since 'fsockopen' can also be used to check the availability of a remote server and to access sensitive data if not implemented properly, enabling it on a shared server may pose a security risk.
As an alternative, you can use the curl function, which offers similar functionality and is often preferred for its enhanced flexibility and security.
他們說因為安全性問題 fsockopen 導致服務器被黑。
請易優(yōu)技術(shù)人員指導一下,看我是否可以使用 curl 繞開fsockopen