Hi, as one of my little "I'm bored at work" projects, I'm trying to write my own redirection script (like go.to etc). I know it's been done before but I want to write my own using subdomains.
I've managed to get everything done except one little bit.. I currently have 6 domains available for people to use. I'm trying to get my little sign up script to search through the database to see if their username is availble with that domain.. For example, say my username was phil (not very original I know), and the domain I was using was me.co.uk. I want the database to search phil.me.co.uk aswell as through the 6 other domains. so it'd also return the other free domains..
What's the best way of doing this without performing 6 queries on the mysql server? Is it something that can be done in one go?
I'm stuck, and I guess my newness to php/mysql is showing 😛
Can anyone give my any tips or show me how they would do it?
TIA
Phil
(Oh yeah, I'm going to release the code if it all works nicely.. so I'm not out to make loads of cash on this one!)