Re: Socket create with ssl server

From: Date: Thu, 10 Apr 2008 23:15:30 +0000
Subject: Re: Socket create with ssl server
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-272853@lists.php.net to get a copy of this message
--- Alan Willsher <al.willsher@googlemail.com> wrote: > Hi how do you use socket_create with an ssl server > > ie I would do something like > > $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); > socket_bind($sock, $sourceip); > socket_connect($sock, 'server.com', 2043); > > but if I do > > $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); > socket_bind($sock, $sourceip); > socket_connect($sock, 'ssl://server.com', 2043); > > I get Warning: socket_connect(): Host lookup failed [-10001]: > Unknown host > > Where do I need to add the ssl:// > Hi, before test your sample program, please check the name "ssl://server.com" from any DNS server that, the name is really present in internet or not. Your problem is basically name resolution error from DNS server. To check the name, apply "host" command from unix/linux terminal. Another point is...as I know the url of ssl encripted page starts with "https://" not with "ssl://"...!!! --- Nirmalya Lahiri [+91-9433113536] __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

« previous php.general (#272853) next »