php分析域名!寫法方法!調用就可以得出域名
- <?
- //轉載保留來源於
- // ####################### 分析域名 #######################
- function phpzygetname($url)
- {
- $referer = preg_replace("/https?://([^/]+)
*/i" " " $url); - $referer = str_replace("www
" "" $referer); - return $referer;
- }
- ?>
From:http://tw.wingwit.com/Article/program/PHP/201311/21148.html