8 replies
I would like to mirror the index page of one of my domains onto another of my domains. At one time i had a simple php code snippet that did the trick and can't locate it any more. I know it used "echo" in it.

It basically pulled the index page with all contents and duplicated it onto the other domain. I tried searching the net but couldn't come up with it.

Thanks in advance.

George
#echo #php #question
  • Profile picture of the author jminkler
    Originally Posted by George Sepich View Post

    I would like to mirror the index page of one of my domains onto another of my domains. At one time i had a simple php code snippet that did the trick and can't locate it any more. I know it used "echo" in it.

    It basically pulled the index page with all contents and duplicated it onto the other domain. I tried searching the net but couldn't come up with it.

    Thanks in advance.

    George
    An iFrame works as well
    {{ DiscussionBoard.errors[2125030].message }}
  • Profile picture of the author Manfred Ekblad
    Originally Posted by Jeff Hope View Post

    Note that any images on the original page must be referenced with a full URL, including HTTP://, in order for this to work.
    ...or have a rewrite rule for jpg/png/gif and so on, which points to a php-file that gets the images from the original server based on the path provided in the src-attribute of the image.

    I doubt that anyone would hardcode all of the URLs' to form complete URLs with http:// and such into the HTML-code.
    {{ DiscussionBoard.errors[2125318].message }}
    • Profile picture of the author jminkler
      Originally Posted by Manfred Ekblad View Post

      I doubt that anyone would hardcode all of the URLs' to form complete URLs with http:// and such into the HTML-code.
      Some IDE's will do this if you have that setting ..
      {{ DiscussionBoard.errors[2125871].message }}
      • Profile picture of the author esoomllub
        Originally Posted by jminkler View Post

        Some IDE's will do this if you have that setting ..
        And some coders do this!

        Not saying it is good practice, but as someone who does quite a bit of site maintenance for sites I did not write... I can say it happens more often than it should.
        Signature
        {{ DiscussionBoard.errors[2129151].message }}
  • Profile picture of the author George Sepich
    Thanks for the help guys.

    George
    Signature

    Need Help? GeorgeSepich.com Digital Marketing Solutions From George Sepich.

    {{ DiscussionBoard.errors[2131833].message }}
  • Profile picture of the author stma
    You might find that you can't use file_get_contents on your server since more and more shared hosts are turning this off.

    Curl is your answer then. It's also faster than your other options in most cases.
    {{ DiscussionBoard.errors[2235862].message }}
  • Profile picture of the author CoderPundit
    You can also look at parked domain option in cPanel. You can have multiple domain pointing to same location so it loads the same page.
    {{ DiscussionBoard.errors[2236816].message }}

Trending Topics