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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-13-2006, 08:06 AM   #1
QualityMpegs
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?
__________________

PAYSITES CATEGORIZED AND THUMBNAILED BY NICHE - 69767780
QualityMpegs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2006, 08:08 AM   #2
StuartD
Sofa King Band
 
StuartD's Avatar
 
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)
StuartD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2006, 08:08 AM   #3
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
$_server["http_host"];

?

edit -- all caps
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2006, 08:10 AM   #4
QualityMpegs
Confirmed User
 
Join Date: Feb 2003
Location: Orlando, Florida
Posts: 3,521
thanks guys!
__________________

PAYSITES CATEGORIZED AND THUMBNAILED BY NICHE - 69767780
QualityMpegs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2006, 08:12 AM   #5
Jer
God is Brazilian
 
Join Date: Feb 2001
Location: Brazil
Posts: 10,601
They said it already and I wanted to post something
Jer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2006, 08:15 AM   #6
QualityMpegs
Confirmed User
 
Join Date: Feb 2003
Location: Orlando, Florida
Posts: 3,521
Code:
$domain=$_SERVER["HTTP_HOST"];
$domain=str_replace("www.","", $domain);
echo $domain;
__________________

PAYSITES CATEGORIZED AND THUMBNAILED BY NICHE - 69767780
QualityMpegs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2006, 08:18 AM   #7
DaddyHalbucks
A freakin' legend!
 
DaddyHalbucks's Avatar
 
Industry Role:
Join Date: Feb 2004
Location: Las Vegas, Nevada USA
Posts: 18,975
GFYers are smart, huh?
__________________
Boner Money
DaddyHalbucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2006, 08:21 AM   #8
QualityMpegs
Confirmed User
 
Join Date: Feb 2003
Location: Orlando, Florida
Posts: 3,521
Quote:
Originally Posted by DaddyHalbucks
GFYers are smart, huh?
better than a damn php forum
__________________

PAYSITES CATEGORIZED AND THUMBNAILED BY NICHE - 69767780
QualityMpegs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.