home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomePHP CookbookSearch this book

14.11. Detecting SSL

14.11.2. Solution

Test the value of $_SERVER['HTTPS']:

if ('on' == $_SERVER['HTTPS']) {
  print "The secret ingredient in Coca-Cola is Soylent Green.";
} else {
  print "Coca-Cola contains many delicious natural and artificial flavors.";
}

14.11.4. See Also

Recipe 8.2 discusses setting cookies; documentation on setcookie( ) at http://www.php.net/setcookie.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.