Re: [PHP] pulling data out of a string

2001-05-24 Thread Dan Lowe
Previously, Richard Kurth said: > > That my problem www is not always the host when it is a sub-domain it > would be like mysit.domain.net or sometimes people put a few extra > periods in the domain name like www.my.test.net I thought maybe I > could look at the string and find out how many peri

Re: [PHP] pulling data out of a string

2001-05-15 Thread Chris Lee
this will remove the www plus the top level domain this will remove the first host and the top level domain. -- Chris Lee [EMAIL PROTECTED] "Richard Kurth" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to figure out how to pull data out

Re[2]: [PHP] pulling data out of a string

2001-05-14 Thread Richard Kurth
Hello Philip, Monday, May 14, 2001, 3:36:17 PM, you wrote: That my problem www is not always the host when it is a sub-domain it would be like mysit.domain.net or sometimes people put a few extra periods in the domain name like www.my.test.net I thought maybe I could look at the string and fin

[PHP] pulling data out of a string

2001-05-14 Thread Richard Kurth
I am trying to figure out how to pull data out of a string. This is driving me crazy. I figure an if statement of some sort would work but I'm not sure how to structure it. I know how to get what I want if it is just $fullhostname = "www.domain.net"; $exp = explode(".", $fullhostname); $host