Rain Lover Posted November 29, 2013 Share Posted November 29, 2013 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 More sharing options...
aloniie Posted November 29, 2013 Share Posted November 29, 2013 You can either use PHP cURL or file_get_contents() function to grab the webpage and then simply echo it. :-) Link to comment Share on other sites More sharing options...
Rain Lover Posted November 29, 2013 Author Share Posted November 29, 2013 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: I don't know how to do it using cURL. Would you mind providing a snippet to use as a template? Doesn't it break the layout when the target page has non-absolute URLs and relative links? Link to comment Share on other sites More sharing options...
aloniie Posted November 29, 2013 Share Posted November 29, 2013 I'd suggest you using file_get_contents, it's easier. However there are tons of examples on Google about how to use curl to get site content, it's pretty easy too. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now