Jump to content

pfsockopen SSL & HTTP


karthikeyan_coder

Recommended Posts

i request two ports

1. 443

2. 80

 

 

313 if($port==443) { 
314		$fp = pfsockopen("ssl://".$host, $port, &$errno, &$errstr);
315	}
316	else {
317		$fp = pfsockopen($host, $port, &$errno, &$errstr);
318	}

 

i am getting two errors..

Warning: pfsockopen() [function.pfsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/public_html/new/index.php on line 314

Warning: pfsockopen() [function.pfsockopen]: unable to connect to www.hostdomain1.com:443 in /home/public_html/new/index.php on line 314

 

Warning: pfsockopen() [function.pfsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/public_html/new/index.php on line 317

Warning: pfsockopen() [function.pfsockopen]: unable to connect to hostdomain2.com:80 in /home/public_html/new/index.php on line 317

 

i have two hosts..

hostdomain1.com

 

hostdomain2.com

 

i need to connect hostdomain1.com's ssl & hostdomain2.com's http ...

 

any idea?

 

Link to comment
https://forums.phpfreaks.com/topic/40248-pfsockopen-ssl-http/
Share on other sites

i am getting two errors..

Warning: pfsockopen() [function.pfsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/public_html/new/index.php on line 314

Warning: pfsockopen() [function.pfsockopen]: unable to connect to www.hostdomain1.com:443 in /home/public_html/new/index.php on line 314

 

Warning: pfsockopen() [function.pfsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/public_html/new/index.php on line 317

Warning: pfsockopen() [function.pfsockopen]: unable to connect to hostdomain2.com:80 in /home/public_html/new/index.php on line 317

 

The errors indicate that pfsockopen can't resolve the domain names. It's a DNS issue.

Link to comment
https://forums.phpfreaks.com/topic/40248-pfsockopen-ssl-http/#findComment-194727
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.