How can I extract the domain name from some text using PHP?
For example, my text should be something like following:
[amr]http://www.example1.com[amr]4[amr]af[amrlf]7
[amr]http://www.example1.com[amr]2[amr]ad[amrlf]22
[amr]http://www.example1.net[amr]1[amr]ad[amrlf]26
[amr]http://www.example1.info[amr]3[amr]af[amrlf]31
Now I just want to get the domain name from this without http://
or www
.
Can anyone help me on this?