简体   繁体   English

https网站上的http iframe

[英]http iframes on https website

i have a website like adf.ly, so basically people come to my site with a long url to short it, once the viewer hit the shorten link, he will have to wait 5 seconds while an ad shows below. 我有一个adf.ly这样的网站,所以基本上,人们到我的网站时都用一个长长的URL来对其进行简短操作,一旦观众点击了Shortcut链接,他将不得不等待5秒钟,而下面的广告才会显示。

the advertisers give me an url to show as an ad, so i show there ad (url) on iframe, but my website is https, its all god when i try to show https websites, but i can't show http website. 广告客户给了我一个要显示为广告的网址,因此我在iframe上显示了该广告(网址),但是我的网站是https,当我尝试显示https网站时,我的天哪,但我无法显示http网站。

i must be able to show http websites, but i still want my website to stay https. 我必须能够显示http网站,但我仍然希望我的网站保持https。

i tryed to search for an answer, but couldn't find exactly what i could do. 我试图寻找答案,但找不到确切的答案。

any help? 有什么帮助吗?

There is no good and simple way to do it. 没有好的简单方法。 It's better try to talk with your advertiser. 最好与您的广告客户联系。 They often supports https urls for ads too, because it's a common case to use on https websites. 他们通常也支持广告的https网址,因为这是在https网站上使用的常见情况。

You could create a proxy script, to which you pass the url (so that you get something like https://your.domain/api/proxy.php?url=http://some.ad.url ), the proxy script would be responsible for fetching the content of the given url (You should of course validate the given urls in some way). 您可以创建一个代理脚本,并将该URL传递给该代理脚本(以便获得类似https://your.domain/api/proxy.php?url = http://some.ad.url的内容 ),该代理脚本将负责获取给定URL的内容(您当然应该以某种方式验证给定URL)。 After that you could use the procy script as the iframe source instead of the ad url directly. 之后,您可以将procy脚本用作iframe源,而不直接使用广告网址。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM