Provided your Apache (or whichever platform you're running) already has SSL Modules installed and configured, this is all you need to do. If you do not, that is actually something you will want to go to your host or vendor for support with as it is beyond the scope of the Constant Contact API.
For anyone else needing to correct their code to operate over BASIC authentication, you need to also change this line:
$request ="http://api.constantcontact.com/ws/customers/" . $UN . "/contacts";
$request ="https://api.constantcontact.com/ws/customers/" . $UN . "/contacts";
Notice the request is now operating over https. I guess Dave missed that one..