• Welcome to AcornDomains.co.uk, a friendly community for UK domain investors, developers and anyone interested in domain names.

    Whether you're looking to buy or sell domains, learn more about the UK domain market, get feedback on your names, or simply chat with other domainers, you're in the right place. AcornDomains has been bringing together people from across the UK domain industry for many years, from complete beginners to experienced investors.

    Have a look around, join the discussions and, if you haven't already, create a free account and introduce yourself.

Parking vs for-sale landing page vs ?

Status
Not open for further replies.
Replace the top code between the <? and ?> down to the start of the html page.

PHP:
<?
include ('./mysql_connect.php');
$debug = false;

	

	/////////////// START DOMAIN CAPTURE BLOCK ////////////////
	$domainz = substr($_SERVER['HTTP_HOST'], strpos($_SERVER['HTTP_HOST'], '.')+1);
	if (strlen($domainz) <= 6) {
		$domainz = $_SERVER['HTTP_HOST'];
		if($debug == true) { echo '<p>var $domainz - Length: ' . strlen($domainz) . ' - Value: ' .  $domainz . ' - Sub Domain: No</p>'; }
	} else {
		$domainz = substr($_SERVER['HTTP_HOST'], strpos($_SERVER['HTTP_HOST'], '.')+1);
		if($debug == true){ echo '<p>var $domainz - Length: ' . strlen($domainz) . ' - Value: ' .  $domainz . ' - Sub Domain: Yes</p>'; }
	}	
	//////////////// END DOMAIN CAPTURE BLOCK /////////////////
	
	
	/////////////// START DOMAIN DEFAULT BLOCK ////////////////
	// add a catch all default.
	//$domainz = "Holding Page"; //set this to whatever you want as your <h1></h1> tag on the page and update the below sql.
	//INSERT INTO `seldoms` (`id`, `domain`, `title`, `description`, `price`, `added`) 
	//VALUES (NULL, 'Holding Page', 'Default Holding Page', 'Sales Jagon', 'Mid &pound;XXX', NOW());
	$queryt = "SELECT domain FROM seldoms WHERE domain = '$domainz' LIMIT 1";
	$resultt = mysql_query($queryt);
	$count = mysql_num_rows($resultt); 
	if($count == 0)	{
		$domainz = "Holding Page"; //update this to match.
		if($debug == true){ echo '<p>var $domainz - Length: ' . strlen($domainz) . ' - Value: ' .  $domainz . ' - Database: False <br> Query: ' . $queryt . '</p>'; }
		}
	//////////////// END DOMAIN DEFAULT BLOCK /////////////////


	/////////////// STATS BLOCK START ////////////////
	//CREATE TABLE `modsanc_seldom`.`stats` (
	//`id` INT NOT NULL AUTO_INCREMENT ,
	//`url` VARCHAR( 70 ) NOT NULL ,
	//`referer` VARCHAR( 256 ) NOT NULL ,
	//`client` VARCHAR( 512 ) NOT NULL ,
	//`added` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
	//PRIMARY KEY ( `id` ) ,
	//INDEX ( `id` ) 
	//) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci 
	$debugstat = 0;
	$ref = mysql_real_escape_string($_SERVER['HTTP_REFERER']);
	$cli = mysql_real_escape_string($_SERVER['HTTP_USER_AGENT']);
	$ips = mysql_real_escape_string($_SERVER['REMOTE_ADDR']);
	$query2 = "INSERT INTO `stats` (`id`, `ip`, `url`, `referer`, `client`, `added`) VALUES (NULL, '$ips', '$domainz', '$ref', '$cli', NOW());";
	$result = mysql_query($query2); 
 	if ($debugstat==1) { //debug
		 echo "Query Result: <pre>$result</pre><br />
		 Query Sumitted: <pre>$query2</pre>";
	if($result != "1")	{
		$error = mysql_errno().": ".mysql_error();
		echo "Error Code: ID:10T<br />
		Error Description: <pre>$error</pre>\n";
	} else {
		echo "Stat Point has been added.<br>";
	}
	}//end debug
	/////////////// STATS BLOCK END ////////////////


	$query = "SELECT id, domain, title, description, price,  date_format(added, '%d/%m/%Y \@ %h:%i %p') AS adds FROM seldoms WHERE domain = '$domainz' LIMIT 1"; 
	
	$doms =  mysql_query($query) or die("Select Failed!");
	
	while ($row = mysql_fetch_array($doms)) {
?>
 
Last edited:
Status
Not open for further replies.
Top Bottom