The whole file is php and I echo javascript this is the entire file:
<?php
execute ();
function execute ()
{
$filename = "xxx.txt";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
$delimiter = " ";
$splitcontents = explode($delimiter, $contents);
$bool = 0;
$index = 1;
$counter = 0;
while ($bool != 1)
{
$counter = $counter + 1;
if ($splitcontents[$index] == $_REQUEST['udr'])
{
$addindex = $index + 1;
echo "<br>Splitcontents val: $splitcontents[$addindex]<br>";
$bool = 1;
$path = 'Unavailable.html';
$path .= chr(10);
if ($splitcontents[$addindex] == $path)
{
echo '<script type="text/JavaScript">
<!--
alert("In the 2nd If");
window.open("http://{$splitcontents[$addindex]}");
//-->
</script>';
}
else
{
echo '<script type="text/JavaScript">
<!--
alert("Software is Available");
window.open("http://$splitcontents[$addindex]");
//-->
</script>';
}
$index = $index + 3;
}
}
?>
In desperation, I came to forum because I could not find any help on the internet, or all of the help I found did not help.