Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8642203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:43:06+00:00 2026-06-12T11:43:06+00:00

I don’t know what is the exact term for this, so my title could

  • 0

I don’t know what is the exact term for this, so my title could be incorrect.

Basically what I what to do is to write a PHP script that has an input field:

Domain Name: <input type='text' name='dname' id='dname' value='http://example.com' />
<input type='submit' name='addname' value='Add A Domain' />

When user type their own domain into the text field and press submit, the script will automatically make a directory, copy some PHP scripts there and map the domain name to there. (The domain name is pointing to our server, of course.)

I have already figured out the mkdir() and copy() part, but I couldn’t figure out the mapping part. How to add an entry to map http://example.com to /home/user/public_html/copy1/ automatically, using PHP?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:43:08+00:00Added an answer on June 12, 2026 at 11:43 am

    It is over 10 months now, so I’ll just suggest what I have found.

    While writing directly to httpd.conf seems the only way, but recently our site change the server. It has cause us so much trouble in those file / folder permission, and the hosting company refuse to help us due to security concern.

    So I have a second look and discovered I am using CPanel for hosting, I can certainly use Addon Domain feature to create and add in new domains.

    But it has its limits. Since it is an addon domain, we can no longer limit the bandwidth and disk usage per domain. Everything is shared. But that doesn’t matter to us anyway.

    So far it works. You can do it by either using the CPanel API library available on the official cpanel website, or you can use the direct URL request way to create the domain. Since we are making a new wordpress install, we create a new database as well.

    http://{username}:{password}@{mysite.com}:2082/frontend/x3/sql/addb.html?db={dbname}
    http://{username}:{password}@{mysite.com}:2082/frontend/x3/sql/adduser.html?user={dbuser}&pass={dbpass}
    http://{username}:{password}@{mysite.com}:2082/frontend/x3/sql/addusertodb.html?db={dbname}&user={dbuser}&ALL=ALL
    http://{username}:{password}@{mysite.com}:2082/frontend/x3/addon/doadddomain.html?domain={newsite.com}&user={ftp_user}&dir={ftp_dir}&pass={ftp_pass}&pass2={ftp_pass}
    

    It doesn’t have to be wordpress. You can use this to install joomla, drupal, phpbb or even you custom script.

    Hope it helps anyone who is reading this. Thanks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't know if this has been asked before, so point me to another question
Don't know if this has been answered before. Have custom routes to users. If
Don't know if there is a better way to do this, so that is
don't know better title for this, but here's my code. I have class user
don't know if the title describes anything about what I'm trying to say but
Don't really know how to formulate the title, but it should be pretty obvious
I don't know why, but this code worked for me a month ago... maybe
Don't think that I'm mad, I understand how php works! That being said. I
Don't know the difference between the System.Window.Controls.TextBox and System.Windows.Forms.TextBox . Noticed that the System.Windows.Forms.TextBox
Don't know if anyone can help me with this or if it's even possible.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.