Php, socket and connecting to pop3-server [duplicate]

落花浮王杯 提交于 2020-01-16 14:57:28

问题


Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select

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.


回答1:


Temporary failure in name resolution

Isn't it clear enough?

if your server having troubles with name resolving, you can use 62.113.86.215 IP address instead.



来源:https://stackoverflow.com/questions/2708739/php-socket-and-connecting-to-pop3-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!