Forum Moderators: open
<HTML><HEAD>
<TITLE>Frames Values</TITLE>
<script type="text/javascript" language="javascript">
function tellerror(){
alert('An error has occurred!') ;
return true ;
}
window.onerror=tellerror
function initialize() {
frames['frame1'].location.href = "whatever.htm";
alert('Load Finished') ;
}
function insertframe() {
var testFrame = frames['frame1'].document.createElement("IFRAME");
testFrame.id = "testFrame";
testFrame.src = "http://www.google.com";
frames['frame1'].document.body.appendChild(testFrame);
}
</script>
<meta http-equiv=refresh content="59; url=<?php $_SERVER['PHP_SELF'];?>">
</HEAD>
<body onload="initialize()">
<p>this is here.</p>
<input type=button value="insert" onClick="insertframe();">
<iframe id="frame1" width="100%" height="90%" name="frame1">
</body>
</html>
Basically you call /local_proxy.php?uri=htp://remotesite.com/whatever
The local_proxy.php script does just a few things: It fetches the remote url, writes the result into a database, then outputs the result. Depending on what you are proxying, the source site may be quite curious as to what you are doing and storing a local copy may make them unhappy.