Dear Pyro:
Talk about problems with a download script!
I don’t even know where to start because I am so overwhelmed. I will try to be calm and collected as I begin to describe the series of problems I am having:
1) I created an htm page that holds the links to the download script, the htm page is very simple and looks like this:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“
<html>
<head>
<title>Agent’s Downloads</title>
</head>
<body topmargin=”0″ leftmargin=”0″ bgcolor=”#ffffff” text=”#fedcf0″ link=”#fedcf0″ alink=”#fedcf0″ vlink=”fedcf0″ >
<table border=”0″ cellpadding=”0″ cellspacing=”0″ width=”100%” >
<tr><td height=”100″ align=”center”><b><font size=”2″>THE PHOTOS BELOW ARE AVAILABLE FOR
HIGH-RESOLUTION DOWNLOADS.</b></td></tr>
<tr>
<td align=”center”>
<a href=”downloads/dlscript3.php?index=0″>
<img class=”thumbnail” border=”0″ src=”downloads/tn/headshot1.jpg” width=”100″ height=”150″></a></td>
<td><a href=”downloads/dlscript3.php?index=1″>
<img class=”thumbnail” border=”0″ src=”downloads/tn/headshot2.jpg” width=”100″ height=”150″></a></td>
<td><a href=”downloads/dlscript3.php?index=2″>
<img class=”thumbnail” border=”0″ src=”downloads/tn/headshot3.jpg” width=”100″ height=”150″></a></td>
</tr>
</table>
</body>
</html>
when I uploaded the page into my web server, a blank page appeared (not an error page) with the same title which is Agent’s Downloads. This behavior continued even after refreshing it many many times. To see this behavior please
click on the following link:
[url]http://naturalmusclegirl.net/downloads.htm
okay , this is very weird, so I decided to save the same page as a php page. Upon uploading it, only part of the information was transmitted and you can see that result here:
[url]http://naturalmusclegirl.net/downloads.php
as you can see after the last photo there is a “<“
this is where the html code stopped being transmitted, when you examine the page with a preview in either frontpage or dreamweaver, the page shows up fine, but upon uploading it this weird behavior occurs.
well at least the images are downloading, but the images name is not appearing, the download pop-up box that appears says:”YOU ARE DOWNLOADING DLSCRIPT FROM NATURALMUSCLEGIRL.NET” The image name is NOT dlscript, that is the name of the php script that is calling it.
I know what you are thinking: okay he made a mistake on
the php script, but I didn’t! that php script was directly taken
from the following link:
[url]http://www.infinitypages.com/research/download.htm
and I personalized it to my page in this way:
<?
#######################################################
#######################################################
$files = array=(“photos/headshot1.jpg”,”photos/headshot2.jpg”,”photos/headshot3.jpg”,”photos/headshot4.jpg”,”photos/headshot5.jpg”,”photos/headshot6.jpg”,”photos/headshot7.jpg”,”photos/army.jpg”,”photos/glamour.jpg”,”photos/jeans1.jpg”,”photos/jeans2.jpg”,”photos/jeans3.jpg”,”photos/pinkhat1.jpg”,”photos/pinkhat2.jpg”,”photos/pinkhat3.jpg”,”photos/pinkhat4.jpg”,”photos/redlingerie1.jpg”,”photos/redlingerie2.jpg”,”photos/redlingerie3.jpg”,”photos/redlingerie4.jpg”,”photos/redlingerie5.jpg”,”photos/bluebikini1.jpg”,”photos/bluebikini2.jpg”);
$index = $_GET[“index”];
$filename = $files[$index];
if (is_file($filename)) {
header(“Content-type: application/octet-stream”);
header(“Content-Length: “.filesize($filename));
header(“Content-Disposition: attachment; filename=””.$filename.”””);
$fp = fopen($filename, ‘rb’);
fpassthru($fp);
fclose($fp);
}
else {
echo “File not available.”;
}
?>
My webserver supports PHP 4.0 only
ANY IDEAS?