Removing subdomains from a form
How can I only extract the base URl from a long string that has been entered into a form?
Example: User inputs: http://stackoverflow.com/question/ask/asdfasneransea
The program only needs:, http://stackoverflow.com
not/question/ask/asdfasneransea
What's the easy way to do it using PHP?
0
source to share