Can I please get an example PHP Script?

Hello, I am very new to the API and am looking for an example script to use to get Started. Could you please help me with that? Thanks!

Their interfaces really are just regular REST calls which you can call via any HTTP client on PHP’s side. For example, cURL. The whole API is documented at

Apart from that, there’s also a PHP wrapper at GitHub - cloudflare/cloudflare-php: PHP library for the Cloudflare v4 API. There are also a few examples and if you need more details it will be best to clarify this on e.g. StackOverflow.

1 Like

Hello! How can I turn this script from making an A record to an SRV record? Here is the file

File: message.txt - Google Drive



That’s not a script. And as @sandro already mentioned, Cloudflare provides the API. It’s up to you or the developer you hire to integrate it into your environment.


Can someone please make this script create an SRV record instead of an A record? Thanks :slight_smile:

As already mentioned twice before, that is something you need to discuss somewhere else as that is not Cloudflare related I am afraid.

1 Like