Dynadot โ€” .com Registration $8.99

Help needed... HTML code (Or : How can I add the sitename automatically)

Spaceship Spaceship
Watch

Kamikaze

lan.guag.esEstablished Member
Impact
56
Well guys, the question is this :
I have a skeleton directory on my reseller account,
I've made an index.html in it - and everything's running OK -
On each new domain account I'm making you can see this page.
I would like to add a line like "welcome to XXX" in it.
Meaning XXX to be the domain name that will appear automatically.
(and obviously not making each domain a different index.html)
Is there any HTML code to do such a thing ?! IMHO I think there is.
I'd appreciate your help, guys !
:)
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
You'd need to do some sort of server side scripting, like PHP.

Change index.html to index.php (or add the .html to the php interpreter via .htaccess) and then wherever you want the domain to appear do something like:

<?php
echo $_SERVER['HTTP_HOST'];
?>
 
0
•••
You'd need to do some sort of server side scripting, like PHP.

Change index.html to index.php (or add the .html to the php interpreter via .htaccess) and then wherever you want the domain to appear do something like:

<?php
echo $_SERVER['HTTP_HOST'];
?>

That worked... B-)
Thanks mate !!
NP$ donated, cheers :great:

---------- Post added at 09:47 AM ---------- Previous post was at 09:41 AM ----------

BTW, nasaboy -
Is there any way for me to make it bigger !?
Tried playing with <font size="5"> etc... no luck :(
 
0
•••
You may be better off using CSS.

or:

<h1>
<?php
echo $_SERVER['HTTP_HOST'];
?>
</h1>

You can always define what H1 is rendered like through CSS:

h1{
font-family: Arial;
font-size: 16px;
font-weight: bold;
}
 
0
•••
You may be better off using CSS.

or:

<h1>
<?php
echo $_SERVER['HTTP_HOST'];
?>
</h1>

You can always define what H1 is rendered like through CSS:

h1{
font-family: Arial;
font-size: 16px;
font-weight: bold;
}

Hi Obulus !
I don't think I am capable of using CSS under the skeleton dir.
If there's a HTML solution - that would be great IMHO ;)
 
0
•••
You can always define CSS inline in the HTML, so for example something like:

<span style="font-family: Arial; font-size: 18px; font-weight: bold;"><?php echo $_SERVER['HTTP_HOST']; ?></span>

should work (where the style= attr is changed to whatever css style you want it to be).
 
0
•••
You can use javascript and just output it where you need it:

window.location.hostname
 
0
•••
If you don't want to use CSS then <font size=" "></font> is the right code.
The default is 3. You can either use numbers (1, 2, 3, 4, 5, 6, etc) or numbers relative to 3 (-2, -1, 3, +1, +2, +3, etc). This is considered deprecated though so you are encouraged to use CSS to style fonts.
The easiest (and most like HTML) way to use CSS to control font size would be <span style="font-size: "></span>. After the colon you can add font size in pixels (#px), in point size (like MS Word: #pt), or other measurements like centimeters (#cm). There are also keywords for font-size like small, medium, large, etc or you can use a percentage of normal size (xxx%).
There are many HTML & CSS resources available to you on W3Schools Online Web Tutorials including the CSS font-size page CSS font-size property

Hope I helped and didn't confused you with to much information lol..
-Sam
 
0
•••
Appraise.net
Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back