问题
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