I need php code that will load another website so it looks like another domain and change text in that page.
For example, say I have the domain [login to view URL] and I want it to show all of the pages and content for <[login to view URL]> (this is just a random made up example), on my [login to view URL] website.
Also, I want to setup text replacement options so for example if the webpage contains links then I can define those with replacements.
Here is an example of what a configuration file might look like:
Site to load: [login to view URL]
TextToReplace0: [login to view URL]
ReplacementText0: [login to view URL]
TextToReplace1: big boat
ReplacementText1: huge boat
TextToReplace2: <script>....full script here</script>
ReplacementText2: "" Null so the script is removed
TextToReplace3: <[login to view URL]>
ReplacementText3: <[login to view URL]>
This would replace the words "big boat" with "huge boat" on the page, replace a script by removing it and replacing it with a space or null, and replace a link from the original page with the new link.
The page will replace references of the original site with its own references so when the user clicks a link they do not leave the new site, this is shown in the ReplacementText0 field. This also means that any parameters will be passed to the php so if someone enters [login to view URL]
then it will load the content of <[login to view URL]>
Needs 15 text replacement definitions so I can replace up to 15 text or links.
The end result is a php code that I upload to one website, it looks and acts like another site. I think this should be fairly easy for someone good with PHP to write since it is mainly loading another page and simple text replacement.
This is part of an affiliate linking test I want to work on where I send people to my custom site instead of the actual site to maximize commissions.