NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Parse a URL in PHP to return domain - Repost

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.

Advanced Search


Reply
 
LinkBack Thread Tools
Old 06-17-2009, 02:43 AM THREAD STARTER               #1 (permalink)
Senior Member
 
PolurNET's Avatar
Join Date: Jul 2004
Location: I ♥ Business Law
Posts: 3,082
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
 

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.
????: NamePros.com http://www.namepros.com/code/590523-parse-url-php-return-domain-repost.html

=============
SCRIPT INFO
PHP Code:
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
????: NamePros.com http://www.namepros.com/showthread.php?t=590523
// ---  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
Last edited by PolurNET; 06-17-2009 at 02:51 AM.
PolurNET is offline   Reply With Quote
Old 03-17-2011, 10:37 PM   #2 (permalink)
First Time Poster!
Join Date: Mar 2011
Posts: 1
vai_rajput is an unknown quantity at this point
 



Sdfdf

---------- Post added at 08:37 PM ---------- Previous post was at 08:36 PM ----------

YOUR SCRIPT IS GIVING ERROR...
Notice: Undefined index: host in C:\xampp\htdocs\123.php on line 56
vai_rajput is offline   Reply With Quote
Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
300 PLUS Domain Names For Sale. Any offers will be considered. thewizardofsales Domains For Sale - Make Offer 20 04-30-2009 12:51 PM
Redemption Grace Period TopNames.com Domain Newbies 1 07-31-2007 12:04 PM
18 Quality Domains Package For 135$ Leaving Business poolpaki Domains For Sale - Fixed Price 0 02-16-2005 05:02 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 03:06 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger