I want to get username from an url after checking the rest of url is similar to a string.
For eg : I need username from the url 'http://mysite.com/username' . before that need to check
site url as 'http://mysite.com/' and also username part contains only alphabets,numbers,
underscore and periods..
How is it possible using php?