How To Remove Www From Domain Using Php
- Forums
- PHP
- How To Remove Www From Domain Using Php
This Page Contains information about How To Remove Www From Domain Using Php By carlais in category PHP with 2 Replies. [2034], Last Updated: Mon Jun 24, 2024
carlais
Tue Jul 28, 2009
2 Comments
621 Visits
hello webune,
today i was writing a simple php script and i wanted to know if you have come accross this.
you see, i have this site and i want to get the domain name using php in my code, but when i do the $_SERVER to get the hostname, i get the full www.example.com - and i only need the example.com part of it without the www.
what can i do?
i sent you the function you can use in php to get to do what you want on your script..
hope that helps