Is it possible to get the content of a url from a specific site and display it in a Popup?

0

I searched the site here and found nothing about it.

Is it possible to do this or is there already something like this?

I would like when entering my site to search another website for an image or link and open it on my site in the form of PopUp.

Example: In a specific area of Site "B" has an image, would like to enter in the "A" site the popup of site "A" search in site "B" that image and display for the visitor in the form of Popup? I'm using an image as an example, but it can be any element.

    
asked by anonymous 21.04.2016 / 18:42

1 answer

0

I believe an image, yes, is possible, as long as your site knows the URL of that image. But the content of an element does not. This would make navigation extremely unsafe. Have you ever imagined, if site B were for example a social network, when you access site A, it could request information from site B, and get all your data, contacts and other things private.

  

In computing, same-source policy is an important concept in   security model of web applications. This policy allows   scripts run on pages that originate from the same site -   combination of scheme, host name and port number - for   access to the DOM of each other without specific restrictions, but   access to DOM in different sites. [1] This policy also applies to   XMLHttpRequests unless the server provides a header   Access-Control-Allow-Origin (CORS). Notably, WebSockets are not   subject to a policy of the same origin.

Source: link

    
21.04.2016 / 22:42