RE: [PHP] POST to port 443 (SSL)

2001-08-28 Thread Jon Farmer

Ermm  you are missing SSL encryption. You can't just try and talk to port
443! You have to use something that talks SSL to talk to port 443.
fsockopen() does not talk SSL.

Regards

--
Jon Farmer  տլ
Systems Programmer, Entanet www.enta.net
Tel +44 (0)1952 428969 Mob +44 (0)7968 524175
PGP Key available, send blank email to [EMAIL PROTECTED]

-Original Message-
From: Patrick Calkins [mailto:[EMAIL PROTECTED]]



Hello,
I am trying to use the UPS Online Tools, the XML version. This requires you
POSTing an XML document to their Tools server, which is SSL enabled. I am
having a problem getting this to connect in PHP (4.0.6) on my server (Apache
1.3.20). In my scripts, I use
$Socket = fsockopen (www.ups.com, 443, $errno, $errstr);

if (!$Socket)
die (Error bla bla bla);

fputs ($Socket, GET /ups.app/xml/Rate HTTP/1.0\r\n\r\n);
...
...
If you point your browser to https://www.ups.com/ups.app/xml/Rate you will
see a response. But this code seems to just time-out. If I change the port
443 to port 80, I will get a response. What am I missing for it to talk to
an SSL port??




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] POST to port 443 (SSL)

2001-08-28 Thread Jason Brooke

 Hello,
 I am trying to use the UPS Online Tools, the XML version. This requires
you
 POSTing an XML document to their Tools server, which is SSL enabled. I am
 having a problem getting this to connect in PHP (4.0.6) on my server
(Apache
 1.3.20). In my scripts, I use
 $Socket = fsockopen (www.ups.com, 443, $errno, $errstr);

 if (!$Socket)
 die (Error bla bla bla);

 fputs ($Socket, GET /ups.app/xml/Rate HTTP/1.0\r\n\r\n);
 ...
 ...
 If you point your browser to https://www.ups.com/ups.app/xml/Rate you will
 see a response. But this code seems to just time-out. If I change the port
 443 to port 80, I will get a response. What am I missing for it to talk to
 an SSL port??

The ability to 'speak ssl' instead of plain text

You should probably use the curl functions to do your post via SSL, or some
other tools if using the curl funcs isn't suitable for you. Incidentally,
you're doing a GET anyway when you say that the server requires a post.

jason


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]