Search code examples
phpdnssubdomain

How to retrieve all subdomains of my domain with PHP


They are dynamically created subdomains. I don't know the names and how much they are, I need to loop the domain to get all the subdomains so I it's something like

foreach domain as subdomain{
 // do something
}

could it be done with PHP?


Solution

  • It's been 2 days, so the conclusion is, there's no way to do this with PHP for now.

    For all, if you landed here with the same problem, Try to retrieve Multisite Wordpress sub-domains automatically with PHP, you can forget it, for now you should handle all the sub domain manually.