PDA

View Full Version : Silly coding question


Puterman
04-12-04, 11:16 AM
Hello Everyone,

I am new to this board and have done a lot of reading before this post looking for my answer, so maybe someone can help me out.

When setting up a new hosting account for a client, how do you get there domain name on the initial start page.

Example:
WWW.THEIRDOMAINNAME.com is under contruction blah blah blah.

I hope that makes sense and thanks for any help.

And thanks to everyone who posts here, a lot of great info and comments!!!!!

Attention Mod: If I have posted this is the wrong forum please move to the right place, thanks.

Puterman :baghead:

websterworld
04-12-04, 11:30 AM
what control panel are you running Cpanel? there should be a branding thing...

Puterman
04-12-04, 11:46 AM
Yes, I am running cpanel. And yes there is a branding function. However I am looking more along the lines of a client who signs up for hosting through my service. Cpanel has a feature where you put things in a folder and when you set the clients account up the things in that folder get set-up as well.

This allows you to create an index.htm page. This is the page I am talking about. When you set up the account and visit the clients page, before they set up their site, you would get a page that states something like:

Welcome to WWW.Domain.Com, this site is under contruction.

I am looking for the code, HTML or other, that pulls the domain name and places it onto the actual web page. It would be a generic code that pulls the name, thus it would reflect different for each client, at least until they get their index page up.

Does that make any sense?

Sometimes I confuse myself. lol

noloc
04-12-04, 01:11 PM
I presume you're using php, if so you can just just use one of the _SERVER vars, ie:


print $_SERVER['HTTP_HOST'];
print $_SERVER['SERVER_NAME']‚


which will print either "domain.com" or "www.domain.com" depending on your vhost config.

for more info, please see: http://se.php.net/reserved.variables

Puterman
04-12-04, 01:37 PM
That is exactly what I was looking for. It works perfect!

Thanks a million!