Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a client with a website. I am building a CMS that needs direct access to the files of the site. I would like to host the CMS files on my own site to prevent other people from going in and using the files without my consent and for convenience (I would be able to set up one database connect file for each client and use one copy of the CMS file instead of uploading the CMS on every client's account - easier to maintain and make changes to all CMS). It's also easier to have all the databases in one place instead of on all kinds of different accounts.

I need to figure out how to set up the CMS and the client website so that the CMS can access the client website. I don't want to compromise load time or SEO. I have it set up now where there are pages on the client site that request the text file from my site that corresponds with the correct content. This is the code that I'm using:

function getter($url) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        $data = curl_exec($ch);
        return $data;

Then in each page, I echo the getter function with the URL in it. First, I would like to know how this affects SEO. Does Google see each page as if the page content were directly in the file?

Is there a better way to accomplish this? A problem I have run into is I want the users to be able to create a new page, but I would have no way of creating that base page in the client's site. Is there some way to implement this with the current structure I have, perhaps some sort of code I could place at the beginning of each HTML file to send the file path to this function that is held in a generic version if this page that reads the file name and displays the URL as that file name and gets the content of that file?

If there is a better way to go about this, I could use any suggestions you may have. I don't think I want to use a domain pointer and host their entire site on my account to prevent search engine duplicate content. I don't want to use a complete redirect because I want the client's URL to be displayed, not mine.

share|improve this question

migrated from stackoverflow.com Jul 31 '13 at 13:22

This question came from our site for professional and enthusiast programmers.

add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.