2

Possible Duplicate:
Use PHP to check if page was accessed with SSL

Is there any way to show up few menus only when the SSL is active with php?

Thanks

Community
  • 1
  • 1
FlourishDNA
  • 500
  • 1
  • 8
  • 20

1 Answers1

3

You can check to see if $_SERVER['HTTPS'] is an empty string or not:

if(!empty($_SERVER['HTTPS']))
{
    echo '<a href="#">Secure Login</a>';
}