Reputation:
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.
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.
i must be able to show http websites, but i still want my website to stay https.
i tryed to search for an answer, but couldn't find exactly what i could do.
any help?
Upvotes: 0
Views: 157
Reputation: 21
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.
Upvotes: 1
Reputation:
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). After that you could use the procy script as the iframe source instead of the ad url directly.
Upvotes: 0