469,271 Members | 1,743 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

DNS lookup...

I have a web page that queries a database returning a recordset containing a
whole series of URLs (host headers).

I want to display these in a table with one of the columns holding the
current I.P. address for each URL. I know how to get a list of these IP
addresses from the cmd prompt using "nslookup" but I'm absolutely clueless
how to get hold of these values in my ASP page.

I'm limited to the fact that this must be only ASP (VBScript, not .NET),
i.e. I can't call install any components.

Any suggestions most welcome

Thanks

Griff
Jul 19 '05 #1
10 7367
I don't think you can do this directely then....
BUT.... perhaps you could do the nslookup piped to a text file? Beyond that
you will need an additional component because I dont believe there is any
builtin method for this in asp/vbscript.

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"GriffithsJ" <Gr************@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I have a web page that queries a database returning a recordset containing a whole series of URLs (host headers).

I want to display these in a table with one of the columns holding the
current I.P. address for each URL. I know how to get a list of these IP
addresses from the cmd prompt using "nslookup" but I'm absolutely clueless
how to get hold of these values in my ASP page.

I'm limited to the fact that this must be only ASP (VBScript, not .NET),
i.e. I can't call install any components.

Any suggestions most welcome

Thanks

Griff

Jul 19 '05 #2
perhaps you could do the nslookup piped to a text file?

That would be sufficient....any ideas how to do that part?

Thanks

Griff
Jul 19 '05 #3
"nslookup www.darkfalz.com > c:\yourFile.txt"

Run this in a command call from vbscript
(http://www.darkfalz.com/1100)
--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"GriffithsJ" <Gr************@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
perhaps you could do the nslookup piped to a text file?

That would be sufficient....any ideas how to do that part?

Thanks

Griff

Jul 19 '05 #4
if the data set is updated on a schedule you could create a scheduled job to
nslookup this list of IPs. How is your database updated?

"GriffithsJ" <Gr************@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
perhaps you could do the nslookup piped to a text file?

That would be sufficient....any ideas how to do that part?

Thanks

Griff

Jul 19 '05 #5
It's a very small database that's just used for ADMIN purposes.

However, we're in the process of moving many of our customers from one
server to another. We therefore are requesting DNS record changes by the
handfull on a daily basis.

What we don't want to do is to have a field that contains this information
because when would we change the value? If we change the IP address when we
request the DNS change then the value will be out-of-date until the DNS
record has filtered through. The ideal situation would be to dynamically
update the value every time the record is looked at, thus ensuring that
we're using the "current" value visible to the whole world.

Griff
Jul 19 '05 #6
Hi GriffithsJ,

Use Windows Scripting Host, so you can execute prompt comands by asp
directly or by .BAT or .CMD file(batch files).
take a look here:
http://www.aspfaq.com/show.asp?id=2059

good luck,

--

««««««««»»»»»»»»»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC
"GriffithsJ" <Gr************@hotmail.com> escreveu na mensagem
news:#C*************@TK2MSFTNGP12.phx.gbl...
I have a web page that queries a database returning a recordset containing a whole series of URLs (host headers).

I want to display these in a table with one of the columns holding the
current I.P. address for each URL. I know how to get a list of these IP
addresses from the cmd prompt using "nslookup" but I'm absolutely clueless
how to get hold of these values in my ASP page.

I'm limited to the fact that this must be only ASP (VBScript, not .NET),
i.e. I can't call install any components.

Any suggestions most welcome

Thanks

Griff

Jul 19 '05 #7
"GriffithsJ" <Gr************@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I have a web page that queries a database returning a recordset containing a whole series of URLs (host headers).

I want to display these in a table with one of the columns holding the
current I.P. address for each URL. I know how to get a list of these IP
addresses from the cmd prompt using "nslookup" but I'm absolutely clueless
how to get hold of these values in my ASP page.

I'm limited to the fact that this must be only ASP (VBScript, not .NET),
i.e. I can't call install any components.


<%
Set objWShell = Server.CreateObject("WScript.Shell")
Set objCmd = objWShell.Exec("nslookup yourip")
strPResult = objCmd.StdOut.Readall()
set objCmd = nothing: Set objWShell = nothing
response.write replace(strPResult,vbCrLf,"<br>")
%>

--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserv...y/centers/iis/

Jul 19 '05 #8
http://www.asp101.com/articles/jason...ns/default.asp
"GriffithsJ" <Gr************@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I have a web page that queries a database returning a recordset containing a whole series of URLs (host headers).

I want to display these in a table with one of the columns holding the
current I.P. address for each URL. I know how to get a list of these IP
addresses from the cmd prompt using "nslookup" but I'm absolutely clueless
how to get hold of these values in my ASP page.

I'm limited to the fact that this must be only ASP (VBScript, not .NET),
i.e. I can't call install any components.

Any suggestions most welcome

Thanks

Griff

Jul 19 '05 #9
BP
Hi,
I just found a dll that allows just that within scripting.
have a look, it's free

ddns: http://www.dastrup.com/html/ddns.asp

Brgds
Bruno
"TomB" <sh*****@hotmailXXX.com> wrote in message
news:uR**************@tk2msftngp13.phx.gbl...
http://www.asp101.com/articles/jason...ns/default.asp
"GriffithsJ" <Gr************@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I have a web page that queries a database returning a recordset containing
a
whole series of URLs (host headers).

I want to display these in a table with one of the columns holding the
current I.P. address for each URL. I know how to get a list of these IP
addresses from the cmd prompt using "nslookup" but I'm absolutely

clueless how to get hold of these values in my ASP page.

I'm limited to the fact that this must be only ASP (VBScript, not .NET),
i.e. I can't call install any components.

Any suggestions most welcome

Thanks

Griff


Jul 19 '05 #10
Fantastic - I'll have a look at that.

Thanks

Griff
Jul 19 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Srini | last post: by
2 posts views Thread by CoreyWhite | last post: by
8 posts views Thread by Lucas Lemmens | last post: by
3 posts views Thread by my-wings | last post: by
1 post views Thread by Zachary Turner | last post: by
13 posts views Thread by paul.joseph.davis | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.