[SOLVED] loading pop up window from PHP script
Posted: Sat Dec 27, 2003 1:22 am
Hello there, hopefully somone can help
we are mirroring a site from here in new zealand. this customers mirror uses a file called dl.php followed by the query and PHP grabs the file to be downloaded.
When the dl.php gets displayed to a web browser we need it to open a popup window that automatically closes after 3 or 4 seconds.
the web url for the link to pop up is [url]
http://www.url.com/assign.php?l=name&mode=behind
the PHP file is as follows
we have tried adding javascript pop up but it doesnt work, throws an error, the page to be opened only needs to be 100 x 50 pixels as its not actually there to display anything, just part of our counting system.
ive tried inserting
<SCRIPT LANGUAGE="JavaScript" src="http://www.url.com/assign.php?l=name&mode=behind"> </script>
But it throws this
Parse error: parse error, unexpected T_STRING in C:\Inetpub\Mirrors\dl.php on line 14
many thanks in advance to whoever looks into this for me
Kindest regards
Geoff
we are mirroring a site from here in new zealand. this customers mirror uses a file called dl.php followed by the query and PHP grabs the file to be downloaded.
When the dl.php gets displayed to a web browser we need it to open a popup window that automatically closes after 3 or 4 seconds.
the web url for the link to pop up is [url]
http://www.url.com/assign.php?l=name&mode=behind
the PHP file is as follows
Code: Select all
<?php
print("<html>
<head>
<TITLE>Downloading...</TITLE>
<style type="text/css">
<!--
A:link {text-decoration: none;}
A:visited {text-decoration: none;}
A:hover {text-decoration: none;}
a:hover{color:red}
-->
</style>
</head>
<body bgcolor="#004080" link="#000080" vlink="#000080" alink="#800000" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<div align="center">
<center>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="73"><p align="center"><a href="http://www.gameburnworld.com"><img border="0" src="http://www.gameburnworld.com/game_header_1.jpg" width="165" height="55"><img border="0" src="http://www.gameburnworld.com/game_header_2.jpg" width="165" height="55"><img border="0" src="http://www.gameburnworld.com/game_header_3.jpg" width="197" height="55"></a></td>
</tr>
<tr>
<td width="100%"><p align="center"><!--Insert Banner Here--!></td>
</tr>
<tr>
<td width="100%"><font color="#004080">|</font></td>
</tr>
</table>
</center>
</div>
<div align="center"><center><table border="1" width="100%" bgcolor="#C0C0C0" cellspacing="0" cellpadding="0" bordercolor="#808080">
<tr>
<td width="100%">
<hr align="center">");
$display_template = "<div align="center">
<center>
<table border="0" width="25%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><p align="center"><font face="Tahoma" size="2" color="#000080"><b><a href='<URL>'target="_blank"</b></font><font face="Tahoma" size="2"><b><MIRROR></a></b></font></td>
</tr>
<tr>
<td width="100%">
<p align="center"><font face="Tahoma" size="2" color="#000000">(Opens In
A New Window)</font></td>
</tr>
</table>
</center>
</div>";
$servers = file ('servers.txt');
for ($i = 0; $i < count ($servers); $i++)
{
$sarr = explode ('::', $servers[$i]);
$sarr[2] = str_replace ('<FILENAME>', $_GET['file'], $sarr[2]);
$dtmp = str_replace ('<URL>', $sarr[2], $display_template);
$dtmp = str_replace ('<MIRROR>', $sarr[1], $dtmp);
$dtmp = str_replace ('<LOCATION>', $sarr[0], $dtmp);
$dtmp = str_replace ('<COUNTER>', $i + 1, $dtmp);
echo $dtmp;
}
print("<p align="center"><font face="Tahoma" size="2"><font color="#FFFF00">Mirror
Provided By:</font> <b><a href="http://www.gtcs.net.nz" target="_blank">GTCS</a></b></font></p> <p align="center"><a href="http://www.gtcs.net.nz" target="_blank"><img border="0" src="http://bgw.gtcs.net.nz/logo1.gif" alt="GTCS New Zealand! Click Now!" width="200" height="100"></a></p>
<hr align="center">
<p align="center"><font face="Tahoma" size="2" color="#800000"><b>* While you
are downloading, please take the time to visit the download mirror sponsor,
their links and banners are on this page.</b></font></p>
<hr align="center">
</td>
</tr>
</table></center>
</div>
<div align="center">
<center>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><font color="#004080">|</font></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="1" width="100%" bordercolor="#808080" cellspacing="0" cellpadding="0" bgcolor="#C0C0C0" height="22">
<tr>
<td width="100%">
<p align="center"><font face="Arial" size="1">© 2004 <a href="http://www.gameburnworld.com"><u>GameBurnWorld</u></a>
® All Rights Reserved | <a href="http://www.gameburnworld.com/termsofuse.htm"><u>Terms
Of Use</u></a> | <a href="http://www.gameburnworld.com/privacypolicy.htm"><u>Privacy
Policy</u></a> | <a href="http://www.gameburnworld.com/contact.htm"><u>Contact
Us</u></a> | <a href="http://www.gameburnworld.com/advertise.htm"><u>Advertise
With Us</u></a> |</font></td>
</tr>
</table>
</center>
</div>
</body>
</html>");
?>ive tried inserting
<SCRIPT LANGUAGE="JavaScript" src="http://www.url.com/assign.php?l=name&mode=behind"> </script>
But it throws this
Parse error: parse error, unexpected T_STRING in C:\Inetpub\Mirrors\dl.php on line 14
many thanks in advance to whoever looks into this for me
Kindest regards
Geoff