The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Moving directories to newly created domains using cPanel XML-API

Discussion in 'cPanel Developers' started by sachintaware, Jan 29, 2013.

  1. sachintaware

    sachintaware Member

    Joined:
    Jan 29, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Moving directories to newly created Domains using Cpanel XML-API(Implementing FTP dynamically using PHP)
    Hello folks
    I am working on an application which allows user to select his own domain and create his webpages and later publish them to the web.Now I want to create a domain with what the user chooses the name to be.So,I went through documentation and learnt about the XML-API class.So,I was able to create the domains dynamically using the
    Code:
    xmlapi.php
    and its function
    Code:
    createacct()
    which takes username,passwd and domain name as parameters.
    Now in my case the user can create few pages and save them as a draft copy to be able to edit them later.Once he is done,he can publish the page to his selected domain.
    Challenges:
    I am not sure how can I move the users work on a server directory where I have initially saved it to his published domain.
    For example:He creates 2 pages and saves them they are saved in a folder.Now,when he publishes,he selects a domain named ABC.net.I want to transfer all his work(folder) to ABC.net and redirect him to that page.Normally I would use a FTP tool like Filezilla to connect to the domain and upload files.But here,may be I need to dynamically connect to FTP and perform the transfer.

    I have the created domain.I was thinking to add an entry to the database with his domain name and then add the transfer logic.How the transfer logic would work as the site where he is working is a different domain and the site to copy is a different domain.

    Any help would be appreciated.I am very new to this to excuse for any mistake.Thank you for your time!
     
    #1 sachintaware, Jan 29, 2013
    Last edited: Jan 30, 2013
  2. sachintaware

    sachintaware Member

    Joined:
    Jan 29, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Around 50 views but no answer/solution yet!! :P I am still stuck!
     
Loading...
Similar Threads - Moving directories newly
  1. jonahnaylor
    Replies:
    1
    Views:
    359

Share This Page