|
|
|
|
|
| <?php
function selfURL() {
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
}
function strleft($s1, $s2) {
return substr($s1, 0, strpos($s1, $s2));
}
?> | |
so you can use it by invoking selfURL() function |
|
| IPhider Obscure Any URL Anonymity connection lores obfuscation corporate survival. Categories : PHP, Algorithms, Security, URLs | | | Proper way to do a header redirection with PHP.
Categories : PHP, Headers, URLs | | | phpRecommend v1.2 - UPDATED - recommend this page to a friend
script - VERY easy install - now with data logging to text file Categories : Complete Programs, PHP, Link to Article, URLs, Misc | | | How to display any array in several rows and columns of a table. Not just
in one column or in alternate rows. This example shows a nice color table
generated with PHP, but can be used with any array values(e.g. Database) Categories : Arrays, PHP, Miscellaneous, Beginner Guides, Graphics | | | Newbie Notes #3 - What went wrong? A useful little debugging aid Categories : PHP, Beginner Guides, Debugging | | | Db_lib - practical example usage of database abstraction and form validation.
Categories : PHP, Form Processing, PHP Classes, Data Validation, Beginner Guides | | | A very simple PHP single password cookie based login without usernames. Categories : PHP, Cookies, Security, Beginner Guides | | | Form Submission Using Array's Categories : PHP, HTML and PHP, Beginner Guides, Arrays | | | Simple SOAP Example (with SoapClient) Categories : PHP, Web Services, SOAP, Beginner Guides | | | SQLite PHP Database Wrapper Categories : PHP, PHP Classes, Databases, SQLite, Beginner Guides | | | PHP Utilities - correct grammar helpers: the plural, to be and to have Categories : PHP, Utilities, Beginner Guides | | | Script loading time Categories : PHP, Beginner Guides, Date Time | | | PHP Email image generator - hide your email from bots - using the GD Library Categories : PHP, Graphics, GD image library, Beginner Guides | | | SubmitForce URL power submitter (searchengine submission class) Categories : PHP, Search Engines, URLs, PHP Classes | | | How to preset a text string in a textarea input field Categories : HTML, HTML and PHP, PHP, Beginner Guides | |
| |
| |
|