php https

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
wpsd2006
Forum Commoner
Posts: 66
Joined: Wed Jan 07, 2009 12:43 am

php https

Post by wpsd2006 »

How do I create https in php?
can someone point me to the right direction ?

do i need to register or pay somewhere first to enable it
or can i create it my own https from my own server ?
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: php https

Post by kaisellgren »

You do not really need to do much in PHP-side. Just make sure the site is accessed through HTTPS:

Code: Select all

if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off')
 {header('Location: https://yoursite.com'); exit;}
You need to get a certificate. OpenSSL can generate certificates and even sign them yourself, which is free, but will generate errors when people visit your site (such as this certificate is not trusted). If your site is public, you need a paid certificate. Try looking at http://www.instantssl.com I like it myself.
ldougherty
Forum Contributor
Posts: 103
Joined: Sun May 03, 2009 11:39 am

Re: php https

Post by ldougherty »

The largest provider of SSL certificates is Trustwave

https://ssl.trustwave.com/

You should read the FAQ, lots of helpful information.

https://ssl.trustwave.com/support/support-faq.php
wpsd2006
Forum Commoner
Posts: 66
Joined: Wed Jan 07, 2009 12:43 am

Re: php https

Post by wpsd2006 »

Thanks looking at it right now
Post Reply