Code covered by the BSD License  

Highlights from
Domain Name Checker

image thumbnail
from Domain Name Checker by Luigi Rosa
Check Domain Name Availability with Matlab

[isfree]=check_domain_internic(URL)
function [isfree]=check_domain_internic(URL)
% Check the availability of a domain name with http://www.internic.net/whois.html
% Web site http://www.internic.net/whois.html
% 
% .aero, .arpa, .biz, .cat, .com, .coop, .edu, .info, .int, .jobs, .mobi,
% .museum, .name, .net, .org, .pro, or .travel
% 
% function [isfree]=check_domain_internic(URL)
% Input
% URL: the domain name
% Output
% isfree: 1 if domain name is free, 0 otherwise
% 
% Example:
% [isfree]=check_domain_internic('google.com') 
%
% Luigi Rosa
% Via Centrale 35
% 67042 Civita Di Bagno
% L'Aquila - ITALY
% mobile +39 3207214179
% email luigi.rosa@tiscali.it
% web site http://www.advancedsourcecode.com
try
    link     = strcat('http://reports.internic.net/cgi/whois?whois_nic=',URL,'&type=domain');
    HTML     = urlread(link);
    if length(strfind(HTML,'No match for domain'))>0
        isfree = 1;
    else
        isfree = 0;
    end
catch
    error('Whois error');    
end

Contact us at files@mathworks.com