Search and replace IP addresses in CloudFlare

Search and Replace CloudFlare IPS

So I had to search between more than 700 dns records in our cloudflare account and update the IP addresses to the new servers, out of this task I came up with this tiny application I did in PHP that allows you to search all your cloudflare accounts for an specific IP address and then replace them with the new IP address.

It uses the cloudflare API. It also uses background processes since the process may take long time.

You can download this tiny app from my github. You need to have php installed and a webserver to show the files. of course you can just use it with the PHP built in web server.

To get started open the includes.php file and enter your cloudflare API and email credentials and then launch the app.

By clicking on replace button the application will only lookup your cloudflare and find the changes and shows them to you as a dry run and once you confirm the changes it will do the changes in the background.

Hope it helps some of you peeps out there.