Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2018
    Thanked 0 Times in 0 Posts

    Question check whether domain name is registered

    I am trying to find out whether a particular domain name is registered. This is different to finding out whether or not an actual hostname exists on the internet at an IP address.

    For example, fred.com might be registered, but might not correspond to an actual host on the internet. However Fred Paris might be an actual host on the net.

    I use the following code to see if a domain exists;

    if ((hp1 = gethostbyname(mybuf)) == NULL) {

    printf("unknown host: %s\n",mybuf);
    return 1;

    It doesn't quite work.

    How should I code this issue? I am not heavily into sockets programming or DNS / BIND. Help Please. Thank you.

  2. #2
    Super Moderator
    Join Date
    May 2002
    Perth Australia
    Thanked 117 Times in 115 Posts
    not sure if windows has builtin whois ?

    exec('whois SDFSFSFSDFSDF.com',$str);
    ... No match for domain "SDFSFSFSDFSDF.COM".

    Many domain wholesalers have an API for registered users , depends why you need this...

    Edit: doh... 3month old question~

    Edit: unless of course you read the date the right (wrong) way around
    Last edited by firepages; Jun 6th, 2018 at 04:03 PM.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts