how would I add a subdomain to my cloudflare account for a specific domain on the fly? Is this possible to do, how do other websites tend to create subdomains in code?
Asked
Active
Viewed 4,059 times
3
-
1do they have an api for dns settings? – Apr 09 '15 at 22:33
-
Ehh, not too familiar with using API's. But it appears so [here](https://www.cloudflare.com/docs/client-api.html). – user2588174 Apr 09 '15 at 22:36
-
I don't know much about configuring Cloudflare, but [this question](http://stackoverflow.com/questions/586129/create-subdomains-on-the-fly-with-htaccess-php) details creating subdomains with PHP. – wavemode Apr 09 '15 at 22:40
-
https://www.cloudflare.com/docs/client-api.html#s5.1 looks like what you ant – Apr 09 '15 at 22:43
-
I'll have a read and see what I can do, cheers :) – user2588174 Apr 09 '15 at 22:45
1 Answers
3
Cloudflare has an API, https://www.cloudflare.com/docs/client-api.html#s5.1.
There is also a PHP library for Cloudflare as well. https://github.com/vexxhost/CloudFlare-API

Jeff Sloyer
- 4,899
- 1
- 24
- 48
-
Looking at the PHP library, they appear to have a way of adding records, etc. Why the downvote? – user2588174 Apr 09 '15 at 22:51
-
The community probably wants to see code because alas links can go 404. It's a good resource, though. – Drakes Aug 27 '16 at 06:32