Source Rally PHP Community Scripts .. Sign up .. Login
Detect which protocol your scripts are being requested by.
Returns http / https .
Access: Public      Tags: ssl, http, https, protocol
Add to favourites       Subscribe comments       Copy code       Bookmark
<?php
function getProtocol()

{

    return 
strtolower(substr($_SERVER["SERVER_PROTOCOL"],0,5))=='https'?'https':'http';

}
?>
Add to favourites       Subscribe comments       Copy code       Bookmark
Sign up to add your own comment here!

Shared by:

regin

Mail user Add to friends
All user contributed content is available under the LGPL unless specified otherwise.
Remaining copyrights Regin Gaarsmand © 2006-2008
About SourceRally.net
Programador PHP