S
S
Schoolboy.2015-10-05 22:20:37
PHP
Schoolboy., 2015-10-05 22:20:37

How to allow to receive site content through iframe?

At first I tested everything on localhost, but now I transferred the images to one hosting, and the site to another. When a file is loaded, its name is placed in an iframe and the site needs to extract it, but the browser does not allow it. Can you somehow allow access to the site through the iframe?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Inchin ☢, 2015-10-06
@In4in

CORS

S
seredaes, 2015-10-05
@seredaes

I did such a thing like this:
t = file_get_contents(" www.intagme.com/... ");
$document = new DOMDocument();
$document->loadHTML($t);
foreach($document->getElementsByTagName('img') as $img)
{
$src []= $img->getAttribute('src');
}
Pulled out pictures, more precisely src of pictures and after where it is necessary - interposed.
In general, as far as I know, it is forbidden to access the iframe by the browser's security policy, and even more so if it is not within the same domain...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question