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.

Auto landing page

Status
Not open for further replies.
Joined
Jun 17, 2011
Posts
1,490
Reaction score
117
Hi guys,

I need some help setting up an automatic landing / sale page for domains..

I'm pretty sure that someone wrote that you can pull the data from the url, and just make it so you set the nameservers on the domain and it populates the rest automatically.

Willing to pay for help..

thanks,

Tony
 
There are a number ways to go about things this works with cpanel

Code:
function check_input($data)
{
    $data = htmlspecialchars($data);
    return $data;
}
//Get Page URL
function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return check_input($pageURL);
}
$url = curPageURL();
$url = str_replace('http://www.','', $url);
$url = str_replace('/','', $url);
if (strpos(curPageURL(),'yourmaindomainname.co.uk') !== FALSE) {
 include $_SERVER['DOCUMENT_ROOT']."/home.php";
 
 }
 else {
 include $_SERVER['DOCUMENT_ROOT']."/forsale.php"; 
 }

If your on a cpanel with this at the route you can use the parked domain feature.
 
Basicaly it pulls one php file with normal homepage stuff if its the main domain otherwise it will pull the sales page.

Let me know if you need a bit more help
 
awesome - thanks man... That's my weekend project sorted now.

I'll buy you a beer if we ever meet up and nice catch recently btw
 
awesome - thanks man... That's my weekend project sorted now.

I'll buy you a beer if we ever meet up and nice catch recently btw

No probs its basically what I use on assetdomains my sales page then uses $url value to get data from a csv I will code it all to a database at some point but it works for now.
 
i used the .skel file in cPanel to achieve this.

http://nottsforest.co.uk/

i do have to add the site/domain to cPanel, then the rest is done automatically as the .skel file sets the default landing page.
 
You can use cURL to park the domain automatically to cpanel

$addom = "http://" . $cpu . ':' . $cpp . "@" . $cph . ":2082/frontend/$theme/park/doaddparked.html?domain=" . $slave; // . "&ndomain=" . $master;

cpu/cpp/cph is user/pass/host.
slave/master is new domain and account name.
theme is obvious.

I run this as part of the inserting a new domain into the parking database.
 
Surely this script could/should pre-populate the "domain" field?

Good point, probably could, i managed to get it to display the domain name in the footer area, so i guess i can do that.

Alternatively, it should be a hidden form field that a user does not need to fill in at all?

Again, good point.
im not much of a coder and i hacked this all together to be honest, and was more than happy i managed to get it to be the default site when i add a domain name.



@PoshTiger - if you upload your template to your .skel file then whenever you add a domain to cPanel your template will be copied over to the new domain you just added (PM for help)
 
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