Thread Closed  Post Thread 

Putting URL on page
Author Message
neluni
Junior Member



Posts: 3
Group: Registered
   
Cash: 0.00 Donate
Putting URL on page

Anyone know if it's possible to automatically put the current URL into the page. Say I want a landing page with the domain on it, but don't want to handcraft each page for each domain.

Thanks in advance


bf6030
05-11-2009 06:56 PM
Send the author a private message Find all posts by this author Quote this message in a reply

Advertisements

This is an ad revenue sharing forum
Nameslot
Administrator

Administrators

Posts: 1,755
Group: Administrators
   
Cash: 200.50 Donate
RE: Putting URL on page

If it is in PHP then you can print it like $_SERVER['SCRIPT_FILENAME']

OR


<?php
$hostname = $_SERVER['SERVER_NAME'];
$hostname = str_replace('www.', '', $hostname);
echo $hostname . htmlentities($_SERVER['REQUEST_URI']);
?>


Sponsor Ads | Nameslot.com
05-11-2009 07:35 PM
Send the author an email Send the author a private message Visit authors website Find all posts by this author Quote this message in a reply

Thread Closed  Post Thread 


View a Printable Version | Send this Thread to a Friend | Subscribe to this Thread | Add Thread to Favorites
Rate This Thread:
Forum Jump: