I'm wondering of the greatest method of getting rid of some things from the domain using PHP.
"http://mydomain.com/" into "mydomain"
"http://mydomain.co.united kingdom/" into "mydomain"
I am searching for a fast function that will permit me to get rid of things like:
"http://", "world wide web.", ".com", ".co.united kingdom", ".internet", ".org", "/" etc
Thanks ahead of time :)
Would you use string replace?
This could strip out 'http://' from the string. All you would need to do first is obtain the current link to the page and pass it through any string replace you desired to..
I'd str_replace the 'http://' after which explode the periods within the full domain title.