We have our web application developed in .php What do you suggest to use with .php so we can create subdomains on the fly, check if desired name of subdomain is available, etc. Thank you for any suggestion.
You could store the subdomains in a database, and point all subdomains to your server's IP in your zone record. Then examine the subdomain on request and redirect to the correct page. You could also use a rewrite rule for this part.
If your DNS entry states *.yourdomain.com then you can have as many sub domains as you like and they'll all get routed to your server. Then use $_SERVER['host'] to extract the subdomain they are using within PHP or do a modrewrite in htaccess if you want to change it to the form of ?subdomain=<subdomain>. I run 170 subdomains on my site using this method and it works great. I then look up the content for that subdomain in the database et viola!