Welcome to the largest and most talked about domain name forum in the World!

We are NamePros, the award-winning free community for domain name owners, buyers and website developers. Once registered, you can:
  • Post your domains for sale or for free appraisals.
  • Private message and conduct business with other domain owners.
  • View member-only forums such as 'Legal Issues' and 'Expired Domains' (NOT visible to search engines)
  • Free access our archives of posts
Join now for free


Go Back   NamePros.com > Discussion > Web Design & Development > Programming > CODE
New! Use your Facebook, Google, AIM & Yahoo accounts to securely log into this site, click logo to login  

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.



Reply
 
LinkBack Thread Tools
Old 06-17-2009, 01:43 AM   #1 (permalink)
NamePros ±SuperElite™±

Forum Moderator

 
PolurNET's Avatar
 
Join Date: Jul 2004
Location: I ♥ Business Law
Posts: 3,068
365.30 NP$ (Donate)

PolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant future
Send a message via AIM to PolurNET Send a message via MSN to PolurNET

Member of the Month
January 2007
Alzheimer's Cancer Survivorship Third World Education Autism Save a Life Cystic Fibrosis Parkinson's Disease Lou Gehrig's Disease (ALS) Autism Multiple Sclerosis SIDS
Cool Parse a URL in PHP to return domain - Repost

Over the last 5 years, I've received at least two dozen requests for a copy of the DomainFind script I coded in 2004 on another thread. Unfortunately, it appears NamePros had deleted older attachments, thus the zip attachment to the original thread was not working.

I've since been concentrating on other things than PHP programming, but I recently managed to dig up a copy of the latest version of the DomainFind script I wrote before. For the benefit of the community and other guests searching Google, I am making it available again.

Note that there may be different techniques now to accomplish the same thing, but the underlying code still works well. You may want to compare with member "deadserious'" code that he posted at http://www.namepros.com/353616-post35.html to see which version better suits your needs.

=============
SCRIPT INFO
PHP Code:
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ---  FIND DOMAIN NAME (HOSTNAME) GIVEN ANY TYPE OF URL OR TLD EXTENSION (v3.01)  ---
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//                    --  VERSION 3.01 Final  --
**NOTEThe below comments may be removed in your scriptAbove must remain intact.
------------------
Changes/Fixes  |
------------------
Added auto removal of 'www' if present
Added ANY TLD routine ... CountryCode TLDs workexco.ukany.tld.ext
Added subdomain function ... manual recognition
Integrated all routines in function... only end-user input is isolated
Fixed SERVER variablesin which "host" is undefinedonly "path" array holds
Fixed case insenstivity mode
Improved Execution of Code via Regular Expressions
*/ 
=============
DOWNLOAD: http://rapidshare.com/files/24546659...Find_v3.01.zip
=============

In case any suggestions, modifications or improvements are needed, please feel free to post here, and I'll see what I can do to improve the code.

Hope this helps!

Regards,
Anand
__________________
PolurNET Communications Avoid the Freeze, Enjoy the Breeze!
= It's my 24th BIRTHDAY today, February 12th =
Proudly #1 on NamePros and WebHostingJury for over 5 years!
||LawPoint.org •• GREAT UK HOSTING DEALS NOW AT: ExcellentHost.com ••

Last edited by PolurNET; 06-17-2009 at 01:51 AM.
PolurNET is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


All times are GMT -7. The time now is 02:34 AM.

Contact Us - NamePros.com - Privacy Statement - Top
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2