Jump to content

DomainChecker


Bru
 Share

Recommended Posts

Hello to all, I am trying to work on a simple little thing. To help domain buyers out.

This little tool will simply check if a domain is taken.. or not.

Here is my code so far..

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>


$Form1 = GUICreate("DomainChecker", 352, 109, 192, 124)
$Label1 = GUICtrlCreateLabel("URL To Check :", 16, 16, 98, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Input1 = GUICtrlCreateInput("", 120, 16, 217, 21)
$Button1 = GUICtrlCreateButton("Check Domain", 120, 48, 217, 25, 0)
$Label2 = GUICtrlCreateLabel("Status:", 120, 80, 55, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("...", 176, 80, 16, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
            
        Case $Button1
            $sDomain = GUICtrlRead($Input1)
            $sLink = "http://www.whois.net/whois_new.cgi?d=" & $sDomain
            $oIE = _IECreate($sLink, 0,0)
            _IENavigate($oIE, $sLink)
            _IELoadWait($oIE)
            
            $sCheck = _IEBodyReadHTML($oIE)
            
            If StringInStr($sCheck, "Available for you now!") Then
                GUICtrlSetData($Label3, "Available")
            Else
                GUICtrlSetData($Label3, "Unavailable")
            EndIf

    EndSwitch
WEnd

I have a problem with this, for some reason it does not change the status.

Thanks..

Ant

[right][/right]

Link to comment
Share on other sites

Hello to all, I am trying to work on a simple little thing. To help domain buyers out.

This little tool will simply check if a domain is taken.. or not.

Here is my code so far..

#include <ButtonConstants.au3>
 
  #include <EditConstants.au3>
 
  #include <GUIConstantsEx.au3>
 
  #include <StaticConstants.au3>
 
  #include <WindowsConstants.au3>
 
  #include <IE.au3>
 
  
 
  
 
  $Form1 = GUICreate("DomainChecker", 352, 109, 192, 124)
 
  $Label1 = GUICtrlCreateLabel("URL To Check :", 16, 16, 98, 20)
 
  GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
 
  $Input1 = GUICtrlCreateInput("", 120, 16, 217, 21)
 
  $Button1 = GUICtrlCreateButton("Check Domain", 120, 48, 217, 25, 0)
 
  $Label2 = GUICtrlCreateLabel("Status:", 120, 80, 55, 24)
 
  GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
 
  $Label3 = GUICtrlCreateLabel("...", 176, 80, 16, 24)
 
  GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
 
  GUISetState(@SW_SHOW)
 
  
 
  
 
  While 1
 
      $nMsg = GUIGetMsg()
 
      Switch $nMsg
 
          Case $GUI_EVENT_CLOSE
 
              Exit
 
              
 
          Case $Button1
 
              $sDomain = GUICtrlRead($Input1)
 
              $sLink = "http://www.whois.net/whois_new.cgi?d=" & $sDomain
 
              $oIE = _IECreate($sLink, 0,0)
 
              _IENavigate($oIE, $sLink)
 
              _IELoadWait($oIE)
 
              
 
              $sCheck = _IEBodyReadHTML($oIE)
 
              
 
              If StringInStr($sCheck, "Available for you now!") Then
 
                  GUICtrlSetData($Label3, "Available")
 
              Else
 
                  GUICtrlSetData($Label3, "Unavailable")
 
              EndIf
 
  
 
      EndSwitch
 
  WEnd

I have a problem with this, for some reason it does not change the status.

Thanks..

Ant

Doesn't the site say

Your domain is available

and not

Available for you now

And don't you need

"http://www.whois.net/checkdomain/index.php?domain="&$sDomain & "tld=com"

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Noo,

And no.

Lol.

If you think, what if someone wants to search for a .org site. Or a .net site. Etc.

Not all sites are .com remember.

No, don't be daft. I don't mean that it has to be com I mean you didn't have anything there, com or org or net so I was giving an example.

If I go here you will see that the text is as I said and not as your script is expecting, so what do you base your "Noo" on?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...