php - How can I edit an iframe with proxy? -
i need edit iframe jquery i'm unable it.
i tried with:
$(document).ready(function(){ $("#iframe").on('load',function(){ $(this).contents().find('body').html('a'); }); });
this code doesn't work.
edit
the iframe related different domain.
you answered own question. code doesn't work because of same origin policy.
you can use php proxy bypass restriction.
<?php $url = "http://example.com"; $domain = file_get_contents($url); echo $domain; ?>
and use information in script.
this question has more details issue.
hope helps!
Comments
Post a Comment