Archive: Why isn't this working..!?


Why isn't this working..!?
I have just found out that my whole program is failing due to NSISdl.
This is simply not working:


NSISdl::download "http://dynamic4.gamespy.com/~aow/ddayupdater.php" "C:\argh.txt"


It shows it being downloaded, but I never find "argh.txt" on my C: drive.

I also know that you need to create the output directory before you can download the file, but there is no output directory that needs creating.

-Stu

Does your script send a Content-Length: header? NSISdl doesn't yet support downloads without a Content-Length header.

Take a look at our update.php for example:
http://cvs.sourceforge.net/cgi-bin/v...viewcvs-markup


So, I need to get it to write that content of the ddayupdates.php to a standard txt file in pure text.
I will have a chat to my web admin about it.

-Stu


NSISdl adds a value to the stack that contains the error description. You might want to check that.


LOL this is what it says:
Quote:


Does this conclude anything?

-Stu

"Server did not specify content length."

Exactly what kichik said, the server should send a Content-Length header.


For any of you people that have a database and are displayign lots of things, here's what I did:

<?php
include('functions.php');
ob_start();

header("Content-Type: " . "text/plain");

db_open();

$map_vault = mysql_query("SELECT game, map_name, file_name, author, description, type, file_size, released, section, datetime FROM map_vault WHERE game = 'dday' ORDER BY file_name");

echo "Section Maps\n";

while ($map = mysql_fetch_array($map_vault))
{
$output = $map["file_name"] . ".bsp|" . $fileplanet . "dday" . "/maps/" . $map["file_name"] . ".zip|" . $map["description"] . "|Author: " . $map["author"] ."\n";
print $output;

}
echo "SectionEnd\n";

$size = ob_get_length();
header("Content-Length: $size");
ob_end_flush();
?>

(note the ob_ stuff) This took me like an hour of tryign to get to work. ALWAYS check the php.net manual for ths stuff. Within 10 minutes of looking around, I found the ob_get_length, which solves all my problems.



NSISdl::download "http://dynamic4.gamespy.com/~aow/ddayupdater.php" "C:\argh.txt"


AS I see it.
The plugin download a file name ddayupdater.php, then copy it to the "C:\" drive the file argh.txt

I think because there are diferent names.
Try using, instead of "argh.txt" use "ddayupdater.php"


NSISdl::download "http://dynamic4.gamespy.com/~aow/ddayupdater.php" "C:\ddayupdater.php"


Now, if you wanna download the file as "argh.txt", rename it after
download ddayupdater.php.


NSISdl::download "http://dynamic4.gamespy.com/~aow/ddayupdater.php" "C:\ddayupdater.php"
Rename "C:\ddayupdater.php" "C:\argh.txt"


That's my opinion.
Helps???? :)

Lobo Lunar, that's not true. Why would there be a filename feature if it doesn't work?. Read the topic, there is already a solution :D


Lobo dumb for not reading well the replies.
Lobo say sorry.
Lobo out :)