Gossamer Forum
Home : General : Internet Technologies :

Using Current URL

Quote Reply
Using Current URL
Is there an $_ENV or $_SERVER variable that holds the CURRENT URL of a site? It want to test whether the site is secure by seeing if the URL starts with http: or https:.

In the alternative, is there another way to test to see if your site is currently using SSL?

Thanks.
Quote Reply
Re: [Lee] Using Current URL In reply to
Hi Lee,

Yes, there is. You can check with the HTTPS variable , i.e. $_SERVER['HTTPS']

Cheers,

Cheers,

Dat

Scripts installation and plugin creation
Plugins
Quote Reply
Re: [tandat] Using Current URL In reply to
You sure? I found that when accessing a PHP variable from HTTPS, a lot of these variables are not available Unsure

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Lee] Using Current URL In reply to
$_SERVER['HTTPS'] is sometimes available and sometimes not.

You could also check what port the visitor is on by using $_SERVER['SERVER_PORT']. Usually 443 is the SSL port and 80 is the regular http port.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund