-1

I am using the following embed code below an infographic on my site (to allow people to easily share the image):

<a href="http://gunsafeslab.com/8-crucial-steps-survive-mass-shooting/"><img src="http://gunsafeslab.com/wp-content/uploads/2017/10/The-8-Crucial-Steps-to-Follow-to-Survive-a-Mass-Shooting.jpg" alt="The 8 Crucial Steps to Follow to Survive a Mass Shooting" width="700px" border="0" /></a>

I have got 15 embeds to that image till now and I see that 4 of the sites which are using the code aren't able to show the image on their sites. It just appears broken.

At first, I thought that it might be the issue of hotlink protection, but that should mean that the embed code shouldn't work on all the 15 sites and the infographic shouldn't load on all.

I had a look at the console of those particular sites and I found this error codes marked near my embed code:

Failed to load resource: net::ERR_CONNECTION_REFUSED

I did my homework and tried searching online for a solution but the responses were not exactly helping me. I request you guys to help me with this and I really appreciate your time and effort.

I am using Google Chrome, if that matters.

Regards.

Naser Mohd Baig
  • 53
  • 1
  • 10

3 Answers3

0

Working on SSL.

<iframe width="250" height="260" frameborder="0" marginwidth="0" marginheight="0"src="/redirect.php?url=https://dns/files.aspx" scrolling="auto">[Your browser does not support frames or is currently configured not to display frames. Please use an up-to-date browser that is capable of displaying frames.]</iframe>enter code here

redirect.php

<?php
$homepage = file_get_contents('https://dns/files.aspx');
echo $homepage;
?>
McPace
  • 1
  • 1
0

I faced the same issue while embedding a website in another website (Squarespace) The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a , , or . Sites can use this to avoid click-jacking attacks, by ensuring that their content is not embedded into other sites. There are three possible directives for X-Frame-Options:

X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN
X-Frame-Options: ALLOW-FROM https://toucan-springtail-bftp.squarespace.com/

I used the 3'd option and the URL after ALLOW-FROM is the URL of the website where you want to embed.

And it worked for me!

Nayana Chandran
  • 1,416
  • 1
  • 16
  • 30
-1

Nevermind guys. I found the solution. It's because those websites had SSL and were requesting the infographic on my site using https and that's what caused the error. I will move my site to SSL and that should fix the issue.

Naser Mohd Baig
  • 53
  • 1
  • 10