Socket Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ndjustin20
Forum Commoner
Posts: 31
Joined: Wed Sep 28, 2005 8:25 am

Socket Question

Post by ndjustin20 »

PHP Version 5.2.5

Redhat Linux

WHM

Cpanel


I am receiving this error

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)

When I use this code:

Code: Select all

 
$posturl = "ssl://" . $host;
   $header = "Host: $host\r\n";
   $header .= "User-Agent: PHP Script\r\n";
   $header .= "Content-Type: text/xml\r\n";
   $header .= "Content-Length: ".strlen($content)."\r\n";
   $header .= "Connection: close\r\n\r\n";
   $fp = fsockopen($posturl, 443, $errno, $errstr, 30);
 

Any help is appreciated,


Justin
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Socket Question

Post by Weirdan »

Your php doesn't support ssl stream wrapper. Ask your hosting company if they can enable it for you.
Post Reply