GET URL parameter in PHP

I’m trying to pass a URL as a url parameter in php but when I try to get this parameter I get nothing I’m using the following url form: http://localhost/dispatch.php?link=www.google.com I’m trying to get it through: $_GET[‘link’]; But nothing returned. What is the problem? 10 Answers 10

PHP Get Site URL Protocol – http vs https

I’ve written a little function to establish the current site url protocol but I don’t have SSL and don’t know how to test if it works under https. Can you tell me if this is correct? function siteURL() { $protocol = (!empty($_SERVER[‘HTTPS’]) && $_SERVER[‘HTTPS’] !== ‘off’ || $_SERVER[‘SERVER_PORT’] == 443) ? “https://” : “http://”; $domainName … Read more

Characters allowed in a URL

Does anyone know the full list of characters that can be used within a GET without being encoded? At the moment I am using A-Z a-z and 0-9… but I am looking to find out the full list. I am also interested into if there is a specification released for the up coming addition of … Read more