+ Reply to Thread
Results 1 to 5 of 5

Check domain availability

Hybrid View

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Check domain availability

    Hello everyone
    I have this URL that checks the avaiability of any domain
    http://www.p5s.net/whois/mwhois.php
    For example : typing "google" and pressing "بدء البحث" button >> will result in "محجوز" which means "Reserved"
    Another example: typing "halloexcel" >> will result in "متوفر" which means "Available"

    I need to create UDF function or vba code that checks the domain and returns either "Reserved" or "Available"
    Hope it is clear

    Thanks advanced for help
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Check domain availability

    Any help with this topic please?

  3. #3
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Check domain availability

    Maybe :

    Sub Test()
      Dim arrIn, arrOut(), i As Long, strURL As String, strPostData As String, str1 As String
    
      arrIn = Range("A2:B" & Cells(Rows.Count, "A").End(xlUp).Row)
      ReDim arrOut(1 To UBound(arrIn, 1), 1 To 1)
      strURL = "http://www.p5s.net/whois/mwhois.php"
    
      With CreateObject("WinHttp.WinHttpRequest.5.1")
        For i = 1 To UBound(arrIn, 1)
            If Len(arrIn(i, 1)) Then
               strPostData = "domain=" & arrIn(i, 1) & "&ext=" & arrIn(i, 2)
               .Open "POST", strURL, False
               .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
               .Send (strPostData)
               str1 = .ResponseText
               If InStr(1, str1, "<FORM action=""order.html"">") Then arrOut(i, 1) = "Available"
               If InStr(1, str1, "<FORM action=""mwhois.php""") Then arrOut(i, 1) = "Reserved"
            End If
        Next i
      End With
    
      Range("C2").Resize(UBound(arrOut, 1), UBound(arrOut, 2)).Value = arrOut
    End Sub
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Check domain availability

    Really amazing .. Really wonderful
    With your perfect solutions I feel that I'm in a dream (of course happy dream)
    Thank you very very much for all this perfect and great help

  5. #5
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Check domain availability

    You are welcome.
    It seemed that my posts have a "psychotropic dream effect"
    Maybe I should stop coding, and start to selling some drugs


    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] To check stock availability and retrieve corresponding Bill Of Entry
    By Krishnab4u in forum Excel General
    Replies: 16
    Last Post: 11-21-2013, 05:32 AM
  2. Replies: 0
    Last Post: 09-16-2013, 04:16 AM
  3. Sort Email by domain and move domain group to new list
    By grandparocks in forum Excel General
    Replies: 4
    Last Post: 01-06-2013, 09:04 PM
  4. Replies: 0
    Last Post: 06-03-2006, 12:10 PM
  5. VBA Availability?
    By Paul Fenton in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-03-2006, 09:50 AM
  6. Check online network availability
    By Hughes@Tiscali.dk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2005, 03:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1