Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

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.

Rule #1: Be Respectful

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

Latest Comments

New Threads

Domain Forum Friends

Lastest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Siusaidh AcornBot:
    Siusaidh has left the room.
      Siusaidh AcornBot: Siusaidh has left the room.
      Top Bottom