/    Sign up×
Community /Pin to ProfileBookmark

more problems with download form

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”
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<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[/url]


_____________________________________________________

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[/url]

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[/url]

and I personalized it to my page in this way:

<?

#######################################################

# This script is Copyright 2003, Infinity Web Design #


# Written by Ryan Brill – [email][email protected][/email] #


# All Rights Reserved – Do not remove this notice #

#######################################################

$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.”;
}

?>


————————————————————–

Not only that, but the file size is also not showing.
——————————————————

My webserver supports PHP 4.0 only

ANY IDEAS?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@Paul_JrJan 28.2004 — Thought you might want to know Pyro won't be here all week. He's got a client putting him up at some ski resort for the whole week. :p ?

http://www.ryanbrill.com/archives/00017.php
Copy linkTweet thisAlerts:
@pierskJan 29.2004 — Yeah, I saw that. How lucky can you get??
×

Success!

Help @christopher spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...