|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Feb 2003
Location: Orlando, Florida
Posts: 3,521
|
PHP code to detect current domain name?
lets say i execute a script like: http://www.domain.com/script.php
what would be the php code to detect the "domain.com" and make it a variable? |
|
|
|
|
|
#2 |
|
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
$_server[http_host]
all caps... (gfy won't let me because it has an "anti-shouting" script) |
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
|
$_server["http_host"];
? edit -- all caps
__________________
Your post count means nothing. |
|
|
|
|
|
#4 |
|
Confirmed User
Join Date: Feb 2003
Location: Orlando, Florida
Posts: 3,521
|
thanks guys!
|
|
|
|
|
|
#5 |
|
God is Brazilian
Join Date: Feb 2001
Location: Brazil
Posts: 10,601
|
They said it already and I wanted to post something
|
|
|
|
|
|
#6 |
|
Confirmed User
Join Date: Feb 2003
Location: Orlando, Florida
Posts: 3,521
|
Code:
$domain=$_SERVER["HTTP_HOST"];
$domain=str_replace("www.","", $domain);
echo $domain;
|
|
|
|
|
|
#7 |
|
A freakin' legend!
Industry Role:
Join Date: Feb 2004
Location: Las Vegas, Nevada USA
Posts: 18,975
|
GFYers are smart, huh?
__________________
Boner Money |
|
|
|
|
|
#8 | |
|
Confirmed User
Join Date: Feb 2003
Location: Orlando, Florida
Posts: 3,521
|
Quote:
|
|
|
|
|