Php、套接字并连接到 pop3-server
我正在尝试使用 php 连接到 pop3 服务器。这是我的代码:
$pop3Server = 'mail.roller.ru';
$pop_conn = fsockopen($pop3Server, 110, $errno, $errstr, 10);
print fgets($pop_conn, 1024);
Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/ockonal/public_html/mail_parser.php on line 45
Warning: fsockopen() [function.fsockopen]: unable to connect to mail.roller.ru:110 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) in /home/ockonal/public_html/mail_parser.php on line 45
Warning: fgets() expects parameter 1 to be resource, boolean given in /home/ockonal/public_html/mail_parser.php on line 46
出了什么问题?我确定在 pop3 服务器地址中。它不打印任何东西。
I'm trying to connect to the pop3-server with php. Here is my code:
$pop3Server = 'mail.roller.ru';
$pop_conn = fsockopen($pop3Server, 110, $errno, $errstr, 10);
print fgets($pop_conn, 1024);
Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/ockonal/public_html/mail_parser.php on line 45
Warning: fsockopen() [function.fsockopen]: unable to connect to mail.roller.ru:110 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) in /home/ockonal/public_html/mail_parser.php on line 45
Warning: fgets() expects parameter 1 to be resource, boolean given in /home/ockonal/public_html/mail_parser.php on line 46
What's wrong? I'm sure in pop3-server address. It doesn't print anything.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
还不够清楚吗?
如果您的服务器在名称解析时遇到问题,您可以使用
62.113.86.215
IP 地址。Isn't it clear enough?
if your server having troubles with name resolving, you can use
62.113.86.215
IP address instead.