strstr() function returns the remainder of string beginning at the first occurrence.
Its syntax is: string strstr (string string, string occurrence) <? $url = "http://www.java2s.com"; $domain = strstr($url, "."); print $domain; ?>