Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Domain Checker
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Domain Checker

 Post Reply Post Reply Page  12>
Author
naeemsyed View Drop Down
Newbie
Newbie


Joined: 12 June 2008
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote naeemsyed Quote  Post ReplyReply Direct Link To This Post Topic: Domain Checker
    Posted: 12 June 2008 at 3:26pm

Hi All

 

I have a signup process which I have done ASP, I wanted to do a domain availability check in during the sign up process, I found a code that pings URL on the internet and adapted it so that it fitted within my code, its below

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

 

function isDomainAvailable(strDomainName, strDomainExt)

 

            isDomainAvailable = false

            url = "www." & strDomainName & strDomainExt

 

    Set objWShell = CreateObject("WScript.Shell")

    Set objCmd = objWShell.Exec("ping " & url)

                        strPResult = objCmd.StdOut.Readall()

    set objCmd = nothing: Set objWShell = nothing

 

    if InStr(strPResult,"TTL=") > 0 then

                        errMsg = "'" & url & "' is already taken and not available"

                        isDomainAvailable = true

            else

                        errMsg = "'" & url & "' may still be available"

                        isDomainAvailable = false

            end if

                       

end function

 

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

 

When I run it on my local machine it all works fine, but when I uploaded it to the remote server on GODADDY (IIS 6.0) where I am hosting my site it gives this error
####################

WshShell.Exec error '80070005'

Access is denied.

#####################
 
I have searched on Google and can’t find a way around this, therefore I need help and if someone can advice me
 
1. Can some please tell me how to over this error so that the script starts working?
 
Back to Top
socialanimal View Drop Down
Newbie
Newbie
Avatar

Joined: 14 October 2007
Location: Leeds, UK
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote socialanimal Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2008 at 4:27pm
The fact that your getting an error denied message means that you can't access wscript on the server which is a security permission that most webhosts don't or won't allow. There is a way around this though, use the XMLHTTP component.

function isDomainAvailable(strDomainName, strDomainExt)

   
isDomainAvailable = False
   
url = "http://www." & strDomainName & strDomainExt

    set objXMLHTTP = server.createobject("Microsoft.XMLHTTP")

    objXMLHTTP.open "GET", url, FALSE

    objXMLHTTP.send NULL

    If objXMLHTTP.status => 200 AND objXMLHTTP.status < 300 Then
       
isDomainAvailable = True
    Else
        isDomainAvailable = False
    End If

    set objXMLHTTP = nothing

End Function

Thats completely off the top of my head but should work fine for your needs. Any problems let me know
Back to Top
naeemsyed View Drop Down
Newbie
Newbie


Joined: 12 June 2008
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote naeemsyed Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2008 at 5:01pm
Thanks for the reply, I inserted the above code and got this error
#######################
msxml3.dll error '800c0005'

The system cannot locate the resource specified.

#######################################
 
the error line is pointing to          
 
 objXMLHTTP.send NULL
 
Please advice
Back to Top
socialanimal View Drop Down
Newbie
Newbie
Avatar

Joined: 14 October 2007
Location: Leeds, UK
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote socialanimal Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2008 at 5:22pm
Change  objXMLHTTP.send NULL to  objXMLHTTP.send 
Back to Top
naeemsyed View Drop Down
Newbie
Newbie


Joined: 12 June 2008
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote naeemsyed Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2008 at 9:00pm
Thank you very much, your advice helped, though it still gave a slight error, but once I changed
 
set objXMLHTTP = server.createobject("Microsoft.XMLHTTP")
to
set objXMLHTTP = server.createobject("MSXML2.ServerXMLHTTP.3.0")
 
It now works fine
 
Regards
Back to Top
coolguy345 View Drop Down
Newbie
Newbie
Avatar

Joined: 16 June 2008
Location: India
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolguy345 Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2008 at 5:58am
Hi naeem..this is hassan here.....the project which u have done will help me out for my final year engineering project cos im doing the same project.....i have also tried with ur coding ...but its not working....anyhow im here explaining u how i have a textBox to enter the domain name and i got another one listBox to select the multiple extension like .com,.org,.edu,.net etc and wen the user click the sendButton it should show the reply in the label whether the domain name is available or not.pls help me out.Thanks in advance
Back to Top
coolguy345 View Drop Down
Newbie
Newbie
Avatar

Joined: 16 June 2008
Location: India
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolguy345 Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2008 at 5:59am
im doing this project in asp.net using C#
Back to Top
naeemsyed View Drop Down
Newbie
Newbie


Joined: 12 June 2008
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote naeemsyed Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2008 at 1:31pm
Hi Coolguy
 
Sorry, the above is done is Classic ASP, I am not much of a C# person
 
Regards
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.