This script will parse whatever is in the file FILE_NAME.php invisibly onto the page using javascript.
<script language="javascript" type="text/javascript">
window.onload = initJavaScript;
function initJavaScript() {
getPage();
}
function getPage(){
var xmlhttp1=false; //Clear our fetching variable
try {
xmlhttp1 = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x objectโฆ
} catch (e) {
try {
xmlhttp1 = new
ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
} catch (E) {
xmlhttp1 = false;
}
}
if (!xmlhttp1 && typeof XMLHttpRequest!='undefined') {
xmlhttp1 = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
}
var file1 = 'FILE_NAME.php'; //This is the path to the file we just finished making *
xmlhttp1.open('GET', file1, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
xmlhttp1.onreadystatechange=function() {
if (xmlhttp1.readyState==4) { //Check if it is ready to recieve data
var content1 = xmlhttp1.responseText; //The content data which has been retrieved ***
if( content1 ){ //Make sure there is something in the content variable
document.getElementById('video').innerHTML = content1; //Change the inner content of your div to the newly retrieved content ****
}
}
}
xmlhttp1.send(null) //Nullify the XMLHttpRequest
return;
}
</script>
<div id="video"></div>