how can i update my dynamic ip with curl php
i have registered a domain and now i want to host it on my own home server ...
i want to setup a system with php curl so that i login to my domain website and update my name servers i.e
http://mycompany.com/webhosting/domain/manage.php?action=showNS&domain_id=10003489
i want to login to that site and auto 开发者_C百科update my dynamic ip address...
You may have an easier time using DynDns.com or No-Ip.com. They offer free software that will likely run on your home server and update your free hostname (yourserver.no-ip.info, or whatever).
From there, just set your domain to use a CNAME and point it to your dynamic DNS hostname. Your domain will always be up-to-date with your current IP and you won't have to worry about nasty web scraping with PHP and CURL.
Gabriel and Marcelo are both correct: Rather than writing a script to log in and update your settings with your DNS provider via web scraping, you can simply assign 'www.yourdomain.com' as a CNAME to a free Dynamic DNS hostname with DynDNS.com or No-IP. Both companies offer update client software which synchronize your hostname with your IP address whenever a change occurs, and if you're really interested in writing the script yourself, our update API is open:
https://www.dyndns.com/developers/
You can also find update clients in most Linksys, D-Link and Netgear routers, though software clients are usually more reliable and easier to troubleshoot. We also offer a paid service if you'd prefer to eschew the 'myhostname.dyndns.org' and update your domain directly.
精彩评论