javascript - My website should not work in others website iframes without prior authorization. -


we offering iframe based application made php. client should place website iframe in website. requirement validate website accessing iframe. want place iframe in pre-authorized websites only. how block others place iframe in theit websites? know http_referer not giving correct referer always.

thanks in advance.

there's no guaranteed solution. web browser not required send http_referrer, , can lie if wanted anyway.

the guaranteed solution client server (the 1 hosting iframe) connect php application , go through authorization process. perhaps authorization generate auth token... client server use auth token parameter in iframe's src url. php application validate auth token , return iframe's contents. @ point, invalidate unique auth token other page requests couldn't reuse it.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -