Hi all...
I am making a url redirection service and I thought that the best way (to minimise file sizes) was to let the user choose a subdirectory of my site.
At the moment the script (which dosen't work) gives the user a random number which is added onto the url in the querystring (ie: domain.com/?r=03885). This, I think is harder to remember than my thought.
I want to be able to let users pick their ending, and then add it onto the end like a directory. So if I were to go to my site and sign up then I would use the username PoorDoggie and I would get "domain.com/poordoggie".
The way I was thinking about doing this is this: when someone signs up, it automatically creates a directory called, well their username, and in that directory the index.php page basically has this code:
<? php include('##user's website##'); ?>
What I would like is subdomains for my users, but I don't know how to us php to make subdomains automatically!
What I need help with is either, a way of autmatically creating directories and php files or a way to redirect any directory typed in to a special script.
The latter works like this: you type in "domain.com/poordoggie" (for instance) and it directs it to a script (without changing the url... domain cloaking I think its called) that takes the directory name and looks it up in a mysql database. The mysql bit is easy, its the directing to a script and cloaking, then getting the username from the URL thats the bit I can't do!
Please help me <-- look at these eyes!
Thanks a lot - in advance... infact thanks for just reading it all!
Tom