views:

89

answers:

3

This is probably a very strange request.

I need to programmaticaly (via code) change the IP where a domain name is pointing to.

IE: xyz.com points to 100.100.100.100

setIP('xyz.com','100.100.100.100');

I know this [code] is practically impossible, however, what I need is to do this via domain host API etc or other possible ways you might think of.

I'd be happy even if it weren't anything more then sending an email to the DNS owner/host.

Do you know of anything the like or which might help?

(nb: considered throwing this at ServerFault, but felt it more at home here ;) )

Cheers!

+7  A: 

You're looking for a Dynamic DNS provider, such as No-IP or DynDNS.

They have HTTP APIs that allow you to change the A records.

SLaks
-But can I change it from raw PHP code?-OK
Christian Sciberras
+1 for actually knowing a provider that has a HTTP API for this :)
Pekka
@Christian well, you would have a domain registered with them. You can then access the API programmatically through PHP.
Pekka
@Christian: Yes; you can use cURL.
SLaks
I think this would settle my question.Thanks SLaks
Christian Sciberras
+1  A: 

It really depends on the setup, where you are doing it from and for what reason?

I guess you are not running a DNS server yourself or hosting the(se) domains either, if you were then this is relatively easy.

More information on what you are trying to achieve using what technology would be helpful.

Lee
That's the problem. The idea is to have a client "register" a domain name with us and then we would manage the domain (its IP), regardless of the technology behind the domain/DNS.SLaks' answer partially fixes this with the suggested company.
Christian Sciberras
Indeed, i don't really see a way around that, unless like you said initially, you have the system automatically send a request to the hosting provider (via email or other method) to update the DNS record if that provider doesn't provide API access. The problem with this of course, is that some hosting providers charge for this service.However, there's a possible business opportunity there to get all hosting providers to provide API access methods, I'm sure your not the only one wanting to do something like this.
Lee
+1  A: 

Hi,

There is an API class called "WMI API", which can be used to manage your stuffs using code/program. please try the below URL.

http://www.delphi3000.com/articles/article_4392.asp

VAC-Prabhu
Interesting. Too bad it's not what I'm looking for ;)+1 for mentioning Delphi :-P
Christian Sciberras