I have this code to show me some web page into my domain (in my page):
<?php
$url = 'http://www.kupime.com/';
$data = file_get_contents($url);
$data = '<head><base href='.$url.' target="_blank" /></head>'.$data;
echo $data;
?>
and all is fine but when I try to close something or do something it doesn’t work because there are no JS files on my server and in the head section is /script/file.js can’t execute. How to solve this problem and how to allow this code to execute into source code. Is there any answer?
You can see demo http://www.pluspon.com/get1.php and you will see that all is good but I can’t close the div popup window because JS files don’t work. If you click on (‘X’) to close, you see that it doesn’t work.
Your code is generating invalid html; you are adding a
headsection, closing it and then add another one from the original site.What you need to do, is use the whole original site and insert the
basetag in the originalheadsection.