I have a client who has a secure site but needs to display non secure pages in iframe. i have a solution below BUT it not showing any images or the CSS.
[login to view URL]:
<?php
if (isset($_GET['url'])) {
$url = $_GET['url'];
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
echo $data;
}
then in your iframe tag, something like:
<iframe src="/[login to view URL]://[login to view URL]"></iframe>
I need a solution!
Hello There,
How are you? I hope you are having great time in your life.
I am having more than five years of experience in PHP webdevelopment.
I can solve this using file_get_conten().
Please let me know more about your requirement.
Looking forward to work with you.
Waiting for your quick and positive reply.
Thanks
RWS
Hi
I am an experienced PHP developer. I got the understanding of the issue. I can try to fix this for you. I am sure it will be done and you will appreciate my efforts :)
Thanks
Hello sir,
I have a solution for you that is easy to implement. Since modern browsers will always block insecure media loaded on a secure web page, I can host for you a free secure server and host all the CSS / JS on it. If you own the HTTP page in question, I can also simply install a free TLS Certificate that will grant you generally trusted HTTPS content to serve.
Another solution, inspired by your piece of PHP code would be to find any <link href="(.+)" /> and any <script src="(.+)"></script> and load that content too then replace the html code to point to the new media file.
I am available to chat if you have any question, feel free to contact me without any commitment from your side and ask me anything.
Expertise in PHP development, including all its major frameworks CakePHP, Laravel, Codeignitor and others. I have also vast proficiency in WordPress development including its custom theme development and code customization.
This seems like a very simple issue that should take no more than 10 minutes. I'll be happy to take a look at it for you. If I can't handle it for some reason in 30 minutes, no charge.