0

I have problem to get state of https protocol if request through iframe which is installed on another web site:

Explanation :

We are advertisement company and always send iframe code to another publisher and they add our iframe code into their web site.

It was working fine but now we had also implemented https as some publisher required.

Now we want to get server protocol of iframe URL request, so we can change our protocol in URL.

our code in codeigniter and set path in config => constant file

Sunny S.M
  • 5,768
  • 1
  • 38
  • 38
  • Why not just always serving https ? It's more safe (ISP can't replace your ads with their), more robust (you're sure you will not have mixed content errors) and faster (than http with spdy/htt2) – Tom Jan 13 '16 at 08:26

1 Answers1

0

use src = //address.to/the/specific/iframe

removing http: will make the url to understand itself if the request is made through http or https

Dray
  • 887
  • 8
  • 25
  • but I can't set //example.com/image.jpg before images it always produce error. I already applied this – Sunny S.M Jan 13 '16 at 08:21
  • if you try to get any image from internet without http like this //example.com/image.jpg this URL could not get image on browser – Sunny S.M Jan 13 '16 at 08:25
  • refer to this question, this might help you. http://stackoverflow.com/questions/3011222/dealing-with-http-content-in-https-pages – Dray Jan 13 '16 at 08:31