If you want each user have own domain name, it will get really difficult. If just own url, (eg.
www.site.com/user1
and
www.site.com/user2
) then you can find a solution by searching the forum. (try searching for URL)
Creating subdomains using php is a tricky business. If you want to allow users to access their personal URL, the subdomains must be created first. If you want to automate that process, either as part of registration, or created by the admin through your website, you will need to configure your server settings (primarily httpd.conf, assuming you're on an apache server) plus a php script. I myself have tried
this script
. It's very good, and it's proven to work (but you may need to tweak it a little to suit your needs).