Jump to content

How to echo an external page from your domain


Rain Lover

Recommended Posts

When I embed an external HTTP iframe into my HTTPS page, I get a mixed content error message:

<iframe src="http://www.example.com"></iframe>

To work around this limitation I'd like to echo the external page from my own domain. How should I do that?

 

Thanks!

Link to comment
Share on other sites

You can either use PHP cURL or file_get_contents() function to grab the webpage and then simply echo it. :-)

 

Thanks for the answer, but:

  1. I don't know how to do it using cURL. Would you mind providing a snippet to use as a template?
  2. Doesn't it break the layout when the target page has non-absolute URLs and relative links?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...