added _SERVER['SERVER_PORT'] in URL and check if not empty _SERVER['HTTPS']
Update url.php
Merge pull request #5 from fiblan/master

added _SERVER['SERVER_PORT'] in URL and check if not empty _SERVER['HTTPS']