hi,
Do you know if we can create subdomain with php.
A user will register for a subdomain, and this script will create it on the fly.
I understand we need to have access to root.
Thanks!
create subdomain with php
Moderator: General Moderators
Hello
If you use zoneedit.com (which I do! and suggest you do), you can create subdomains with a simple command:
lynx -source -auth=username:password 'http://dynamic.zoneedit.com/auth/dynami ... domain.com'
or
wget -O - --http-user=username --http-passwd=password 'http://dynamic.zoneedit.com/auth/dynami ... domain.com'
Replace www with the subdomain. This must be done on a computer with the IP you want.
If you use zoneedit.com (which I do! and suggest you do), you can create subdomains with a simple command:
lynx -source -auth=username:password 'http://dynamic.zoneedit.com/auth/dynami ... domain.com'
or
wget -O - --http-user=username --http-passwd=password 'http://dynamic.zoneedit.com/auth/dynami ... domain.com'
Replace www with the subdomain. This must be done on a computer with the IP you want.
Correct me if I'm wrong, but isn't a subdomain just another folder in a directory? IE:
php.mywebsite.com is the same as http://www.mywebsite.com/php/
Therefore, you could just create a script that would create a new directory and set the proper permissions. I already did it but PHP safe mode is on so I cant take advantage of it..
php.mywebsite.com is the same as http://www.mywebsite.com/php/
Therefore, you could just create a script that would create a new directory and set the proper permissions. I already did it but PHP safe mode is on so I cant take advantage of it..