NamePros
NamePros is a 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 and webmasters.
  • View member-only forum areas such as 'Legal Issues' and 'Expired Domains' (NOT visible to Google, Yahoo or any search engines.)
  • Free access to our searchable archives spanning 7 years and over 2 million forum posts.
Create an account now or login using your Facebook account.


Go Back   NamePros.com > Discussion Forums > 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.



Closed Thread
 
LinkBack Thread Tools
Old 01-20-2007, 04:10 PM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Dec 2006
Posts: 141
0.00 NP$ (Donate)

Stitch is on a distinguished road
 



Arrow [PHP] Domain Availabilty Checker - Checks tlds - Version: 1.0.0.0

Hello,

This is my first script on this site, and seeing Matthew. 's Script I decided to make one a little different. Instead of checking multiple domains, this one checks multiple tlds!


Demo


A live demo of this can be found here: http://70.85.180.226/~thetopto/Scripts/Domain_Checker/

Some of this script uses Matthews. code, I obviously have permission as Matt is a good friend and yes I did ask first.

How To Use:


Enter something like:
  1. techtuts
  2. namepros
  3. pixel2life
  4. lmao
  5. sitename

and it will return the availability of each tld told to in the script. Saves typing all domains out in matts

Anyway, your waiting to see the script arent ya


The Script:


PHP Code:
<?php
set_time_limit
(0);
ob_start();

/*
| ---------------------------------------------------
| > Script Name: Domain Availabilty Checker
| > By: Adam
| > Website: www.portfoliosp.com
| > Version: 1.0.0.0

| -- Credits:
|     > With thanks to Matt Jewell (Matthew.) | www.mattjewell.com
|
| -- IMPORTANT --
|     This copyright notice must be left intact. Feel free to modify this script.
|    This script may NOT be sold under any circumstances!
| ---------------------------------------------------
*/


include 'inc/dnservers.php';    

###########################################

if(isset($_POST['submit']))
{
    
$domain str_replace(array('www.''http://'), NULL$_POST['domain']);
    
    if(
strlen($domain) > 0)
    {
        echo 
'<h2>Checking Domain</h2>';
        echo 
'Please wait while the results are processed....<br /><br />';
        
        foreach(
$ext as $extension => $who)
        {
            
$buffer NULL;
                
            
$sock fsockopen($who[0], 43) or die('Error Connecting To Server:' $server);
            
fputs($sock$domain.$extension "\r\n");
                
                while( !
feof($sock) )
                {
                      
$buffer .= fgets($sock,128);
                }
                
            
fclose($sock);
                            
            if(
eregi($who[1], $buffer))
                {
                    echo 
'<div style="color: green;">' $domain $extension .' is Available</div>';
                }
                else
                {
                    echo 
'<div style="color: red;">' $domain $extension .' is Taken</div>';
                }
                
        
ob_flush();
        
flush();
        
sleep(0.3);
        
        }
        
        echo 
'<h2>Completed</h2>';
    }
    else
    {
        echo 
'Please enter the domain name';
    }
}
else
{
?>
<div style="text-align: center">
    <form method="post">
        <input type="text" name="domain" />
        <br /><br /><input type="submit" name="submit" value="Check Availability" style="font-size: 10pt;" />
        
    </form>
</div>
<?php
// The End
?>
This is the first version of this script and may have a few bugs.

Script details:

Quote:
/*
| ---------------------------------------------------
| > Script Name: Domain Availabilty Checker
| > By: Adam
| > Website: www.portfoliosp.com
| > Version: 1.0.0.0
|
| -- Credits:
| > With thanks to Matt Jewell (Matthew.) | www.mattjewell.com
|
| -- IMPORTANT --
| This copyright notice must be left intact. Feel free to modify this script.
| This script may NOT be sold under any circumstances!
| ---------------------------------------------------
*/

Download


Download script HERE

-----

The script is free to use, and you may distribute. You must NOT sell in anyway. You can modify it if you wish. Just leave copyright intact!

Enjoy, and look out for future versions!

Please post bugs and suggestions below.

Thanks,
Adam

Last edited by . Adam .; 01-20-2007 at 04:15 PM.
Stitch is offline  
Old 01-20-2007, 04:45 PM   #2 (permalink)
Stud Sausage
Join Date: Dec 2006
Location: England
Posts: 1,550
34.41 NP$ (Donate)

Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of
 


Adoption Breast Cancer Breast Cancer Cancer Survivorship
Smells like Matt.

Thanks for the credit, I'll get around to recoding mine at some point, i don't like how it's done.
Matthew. is offline  
Old 01-20-2007, 04:50 PM THREAD STARTER               #3 (permalink)
NamePros Member
Join Date: Dec 2006
Posts: 141
0.00 NP$ (Donate)

Stitch is on a distinguished road
 



Matt, I have a great idea

I'll talk to you about it over MSN, when you get your butt online
Stitch is offline  
Old 01-20-2007, 06:33 PM   #4 (permalink)
 
kleszcz's Avatar
Join Date: Jul 2006
Posts: 4,511
1,758.80 NP$ (Donate)

kleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatness
 
My Twitter



Marrow Donor Program Multiple Sclerosis
Thanks. Nice one. How about additional tlds? .mobi, .cc and .in
kleszcz is offline  
Old 01-21-2007, 04:24 AM THREAD STARTER               #5 (permalink)
NamePros Member
Join Date: Dec 2006
Posts: 141
0.00 NP$ (Donate)

Stitch is on a distinguished road
 



You can easily add support for .cc, im not sure about .in and .mobi . I'll put them in the next version.

But until the next version, open up inc/dnservers.php

Find:
PHP Code:
    '.be'         => array('whois.ripe.net','No entries'), 
Add After:
PHP Code:
    '.cc'         => array('whois.nic.cc','No match'), // Requested 
Save and close.

Done This will be done in the next release
Stitch is offline  
Old 01-21-2007, 08:37 AM   #6 (permalink)
Stud Sausage
Join Date: Dec 2006
Location: England
Posts: 1,550
34.41 NP$ (Donate)

Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of
 


Adoption Breast Cancer Breast Cancer Cancer Survivorship
Originally Posted by . Adam .
You can easily add support for .cc, im not sure about .in and .mobi . I'll put them in the next version.
PHP Code:
// Add after '),

'.in'      => array('whois.inregistry.net''NOT FOUND'),
'.mobi'    => array('whois.dotmobiregistry.net''NOT FOUND'), 
Matthew. is offline  
Old 01-21-2007, 10:31 AM   #7 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,801
56.00 NP$ (Donate)

Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
Is the .3 seconds enough to not get rate limited by TLDs like .org and .in?
Dan is offline  
Old 01-21-2007, 10:39 AM   #8 (permalink)
Stud Sausage
Join Date: Dec 2006
Location: England
Posts: 1,550
34.41 NP$ (Donate)

Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of
 


Adoption Breast Cancer Breast Cancer Cancer Survivorship
Originally Posted by Dan
Is the .3 seconds enough to not get rate limited by TLDs like .org and .in?
The .3 seconds was added by me to actually stop the script killing itself, if removed occasionally the script will start spitting errors. (to be exact you cannot connect to the servers)

Rate limiting is how many requests you can make to the server in a time period yes? I don't actually know, that's my guess lol.

If so i personally haven't had a problem with mine and no one else has reported one so i would assume yes to your question
Matthew. is offline  
Old 01-22-2007, 08:06 AM   #9 (permalink)
NamePros Regular
Join Date: May 2006
Posts: 256
68.15 NP$ (Donate)

3l3ctr1c has a spectacular aura about3l3ctr1c has a spectacular aura about
 



ok there goes it ajaxed -> http://www.namepros.com/code/284641-...er-checks.html
3l3ctr1c is offline  
Old 01-25-2007, 07:42 AM   #10 (permalink)
NamePros Regular
Join Date: Feb 2005
Posts: 573
1,958.47 NP$ (Donate)

abcde is a jewel in the roughabcde is a jewel in the roughabcde is a jewel in the rough
 



when i tried with ".org" i received this message:

Code:
Warning: fsockopen() [function.fsockopen]: unable to connect to whois.pir.org:43 (Connection timed out) in /home/*****/public_html/dnlookup/index.php on line 75
Error Connecting To Server:whois.pir.org

anyway, this is a great script.

Last edited by abcde; 01-25-2007 at 09:45 PM.
abcde is offline  
Old 03-11-2007, 11:08 PM   #11 (permalink)
BlahBlahBlah...
 
navjotjsingh's Avatar
Join Date: Oct 2005
Location: India
Posts: 1,947
57.21 NP$ (Donate)

navjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud ofnavjotjsingh has much to be proud of
 
My Twitter

Send a message via Yahoo to navjotjsingh


Marrow Donor Program
Some problems in IE 6.

It works in IE 6 only when I click Check Availability button and not when I press enter after entering the value in search box.

Last edited by navjotjsingh; 03-11-2007 at 11:19 PM.
navjotjsingh is offline  
Old 03-11-2007, 11:34 PM   #12 (permalink)
NamePros Regular
 
cheeta's Avatar
Join Date: Feb 2006
Location: 220.225.82.33
Posts: 389
182.35 NP$ (Donate)

cheeta is on a distinguished road
 
Send a message via Yahoo to cheeta



hey I cant download because the download link is broken
__________________
LiveTV.ws - Live Internet TV
cheeta is offline  
Old 03-11-2007, 11:50 PM   #13 (permalink)
Part-Time Zombie
 
whitebark's Avatar
Join Date: Jul 2006
Location: Canada
Posts: 3,454
234.15 NP$ (Donate)

whitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond repute
 
My Twitter



Protect Our Planet
Here is a huge request - I'd even pay for this to be included:

When a domain name is searched and found to be available the available name should become an active link to where the searcher can then register the domain. Of course the hyperlink would contain our affiliate code so we get a piece of the action.

It would need the ability to put in affiliate codes to different registrars for each .tld or group of tld's.

As well, for user satisfaction - the search box should remain displayed after a search to entice them to search again instead of closing the browser window.

Again - I will pay to have these features added.

Roy
whitebark is offline  
Old 03-29-2007, 12:10 PM   #14 (permalink)
Senior Member
 
cyberoptik's Avatar
Join Date: Aug 2003
Location: Chicago Burbs
Posts: 1,049
2,426.06 NP$ (Donate)

cyberoptik is a name known to allcyberoptik is a name known to allcyberoptik is a name known to allcyberoptik is a name known to allcyberoptik is a name known to allcyberoptik is a name known to all
 
Send a message via AIM to cyberoptik



Download link / site are down. Please repost a new url .
__________________
Web Scripts - The Best Scripts on the Web
cyberoptik is offline  
Old 06-23-2007, 05:14 PM   #15 (permalink)
Senior Member
 
ethix's Avatar
Join Date: Aug 2006
Location: Australia
Posts: 1,189
159.95 NP$ (Donate)

ethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud of
 



Originally Posted by whitebark
Here is a huge request - I'd even pay for this to be included:

When a domain name is searched and found to be available the available name should become an active link to where the searcher can then register the domain. Of course the hyperlink would contain our affiliate code so we get a piece of the action.

Roy
im pretty sure
http://www.cj-design.com/products/fr...cjdomainwhois/
does what you require and its free

EDIT: sorry bout replying to such an old thread i did notice the time stamps on the post till after i replied
ethix is offline  
Old 06-23-2007, 05:26 PM   #16 (permalink)
Part-Time Zombie
 
whitebark's Avatar
Join Date: Jul 2006
Location: Canada
Posts: 3,454
234.15 NP$ (Donate)

whitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond reputewhitebark has a reputation beyond repute
 
My Twitter



Protect Our Planet
Thanks ethix - I'm going to take a look at it now.
whitebark is offline  
Old 06-23-2007, 06:31 PM   #17 (permalink)
Octane Media Works
 
OctaneInv's Avatar
Join Date: Apr 2007
Location: Upstate, NY
Posts: 979
0.00 NP$ (Donate)

OctaneInv is a name known to allOctaneInv is a name known to allOctaneInv is a name known to allOctaneInv is a name known to allOctaneInv is a name known to allOctaneInv is a name known to all
 



Ethix, thank you for reviving the thread!

I was looking for this!
__________________
shiftyMEDIA
Producing Excellence Since 2007
OctaneInv is offline  
Old 06-23-2007, 07:18 PM   #18 (permalink)
Senior Member
 
ethix's Avatar
Join Date: Aug 2006
Location: Australia
Posts: 1,189
159.95 NP$ (Donate)

ethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud ofethix has much to be proud of
 



you are welcome guys/gals
ethix is offline  
Closed Thread


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



Quick Cash Domaining

Quick Cash Domaining



Advertise on NamePros
All times are GMT -7. The time now is 10:11 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   Ad Management plugin by RedTyger