PHP echo question

by 8 replies
9
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
#programming #echo #php #question
  • An iFrame works as well
  • ...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.
    • [1] reply
    • Some IDE's will do this if you have that setting ..
      • [1] reply
  • Thanks for the help guys.

    George
  • 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.
  • 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.

Next Topics on Trending Feed

  • 9

    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.