How to find the full URL of the page in PHP in a platform independent and configuration independent way

    Date: 06/03/05 (Java Web)    Keywords: php

    Without much ado, I present the script. It handles http and https URL's and should work across platforms and configurations (like using htaccess for clean url's etc.). To understand more about the issues involved read - Understanding $_SERVER[’PHP_SELF’], $PHP_SELF, $_SERVER[’REQUEST_URI’] and $_SERVER[’SCRIPT_NAME’] in PHP and when to use what $_SERVER['FULL_URL'] = 'http'; $script_name = ''; if(isset($_SERVER['REQUEST_URI'])) { [...]

    Source: http://blog.taragana.com/index.php/archive/how-to-find-the-full-url-of-the-page-in-php-in-a-platform-independent-and-configuration-independent-way/

« Understanding the Role of... || New gene found to... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home