Hi all,
I was requested by someone from another forum to code a script that can efficiently and effortlessly return a domain name & extension, given any type of URL (including ccTLDs as .co.uk, etc.) Well it turned out harder than said, so thought I should share the code I developed with this community
Enjoy & comments are appreciated!
==================
Quote:
Here is the Version 3.01 Final, 100% working, and newest full-featured version of this script. :talk: :]
Now, it's protected by the free GNU Public License, so please respect the property rights and leave the credits.
|
Info:
PHP Code:
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// --- FIND DOMAIN NAME (HOSTNAME) GIVEN ANY TYPE OF URL OR TLD EXTENSION (v3.01) ---
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// -- VERSION 3.01 Final --
**NOTE: The below comments may be removed in your script. Above must remain intact.
------------------
| Changes/Fixes |
------------------
+ Added auto removal of 'www' if present
+ Added ANY TLD routine ... CountryCode TLDs work! ex> co.uk, any.tld.ext
+ Added subdomain function ... manual recognition
+ Integrated all routines in function... only end-user input is isolated
+ Fixed SERVER variables, in which "host" is undefined, only "path" array holds
+ Fixed case insenstivity mode
+ Improved Execution of Code via Regular Expressions
*/
Package Attached to this post. If ever you run into problems, have suggestions, feature improvements or bug reports, simply email me at info@polurnet.com OR PM here, OR post here 
__________________
•• Visit the InfoResourceNetwork Please login or register to view this content. Registration is FREE ::history::science::math::geo::essays::& more!••
•• Please login or register to view this content. Registration is FREE
==Avoid the freeze and enjoy the breeze with PolurNET Hosting™==
|