PHP
PHP : get Request protocol Http or HTTPS
How to get Requested protocol Http or HTTPS in PHP? This function will return True if HTTPS when called… is_https() { return strtolower(substr($_SERVER["SERVER_PROTOCOL"],0,5))==’https’? true : false; } is_https() { return strtolower(substr($_SERVER["SERVER_PROTOCOL"],0,5))==’https’? true : false; }
PHP URL Validate using RegEx
After going through lots and lots of url validation scripts, I come across this wonderful and easy RegEx validation script works perfectly. This information has been posted in phpcentral by fqa. Amazingly author has also given detailed information for switching how a URL should be. For example, http://localhost is a VALID URL and you may [...]
Recent Comments