Page 1 of 1
SSL tutorial
Posted: Sun May 23, 2004 4:08 am
by yonscun
Hi
I just install Mod SSL and Open SSL.
Anybody can give me a simple example how to use SSL with PHP?
I want to create a secure login (like hotmail/yahoo)
Any answer will be very apreciated
Thanks A lot
yonscun
Posted: Sun May 23, 2004 4:54 am
by Weirdan
SSL works on lower level than php, therefor completely transparent to PHP.
Posted: Sun May 23, 2004 5:14 am
by launchcode
Yeah.. just access your site via https instead of http and that's it - all comms to/from the browser are encrypted. It's nothing more complex than that
(Until you get into the realms of sending post data to an SSL server you're not in charge of, via cUrl, which is one hell of an experience I can tell you - having spent the past 2 days working on it!)
Posted: Sun May 23, 2004 5:19 am
by Weirdan
cURL? The easiest extension in PHP
I used to write web-spiders in PHP with curl, usually it takes no more than several hours

Posted: Sun May 23, 2004 5:23 am
by launchcode
The code wasn't the problem, setting it all up locally on a Windows box was - it's quite an interesting process for sure, especially trying to integrate with Zend Studio and your own SSL cert (the verifypeer hack was no good for me). Add to the mix the fact that the remote SSL server had a dodgy certificate (the kind that throws up warnings in browsers) and it all got very interesting - it's actually possible to core dump PHP (and consequently Apache) on Windows just by having the wrong flags in your setopts - which lengthened the process somewhat! Still it's working great now and the XML gateway is returning all the data I need.
Posted: Sun May 23, 2004 5:24 am
by launchcode
For what it's worth, setting it up on my FreeBSD server took a matter of minutes.
Bloody Microsoft

Posted: Sun May 23, 2004 5:29 am
by Weirdan
Setting any server on WinBlows is 'quite interesting process', I'd say
