.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   OT:Is this the right forum for HTML help? (http://forum.shrapnelgames.com/showthread.php?t=10121)

Ruatha August 14th, 2003 06:43 AM

Re: OT:Is this the right forum for HTML help?
 
There was one space character infront of &#060?php
that messed all up, now I'm getting somewhere http://forum.shrapnelgames.com/images/icons/icon7.gif

The only remaining problem is taht it wants to add the extension .php to the file, so the suggested filename in the download dialogue is NGC3_57.zip.php

Hmm, how to remove that??

I had to change the Content-Type header to x-zip-compressed and now it works great.

[ August 14, 2003, 05:57: Message edited by: Ruatha ]

Fyron August 14th, 2003 06:51 AM

Re: OT:Is this the right forum for HTML help?
 
Quote:

If the headers aren't needed, how to make the browser download the file without the need of clicking any link??
<font size="2" face="Verdana, Helvetica, sans-serif">Oh, I didn't realize that is what you wanted it to do. I have no idea how to do that.

Fyron August 14th, 2003 06:54 AM

Re: OT:Is this the right forum for HTML help?
 
This looks like you are cutting off the file extension, and I see no line to add a new one:

$fname = basename($file);

So that might cause problems. http://forum.shrapnelgames.com/images/icons/icon12.gif

Ruatha August 14th, 2003 07:01 AM

Re: OT:Is this the right forum for HTML help?
 
Nope, now all is working, it was the content type.
Thanx for the help, I chose your way to find the file instead of mine as if I use yours I can just copy new files into the directory and leave the old ones, but with mine I had to delete the old ones.
So:
http://ruatha.homelinux.org

press "Get latest game turn file" for the script, and here is the script finished:

http://ruatha.homelinux.org/upload.txt

I removed the line
$fname = basename($file);
as it had not use, just a reminder of something previously tested.

[ August 14, 2003, 06:57: Message edited by: Ruatha ]

Fyron August 14th, 2003 07:03 AM

Re: OT:Is this the right forum for HTML help?
 
Cool. http://forum.shrapnelgames.com/images/icons/icon7.gif Glad I could help.

Ruatha August 14th, 2003 10:58 AM

Re: OT:Is this the right forum for HTML help?
 
Ahh, this PHP is fun, now I've made it more PBW like with players upload status on the first page.

Thanx for starting me on PHP!

[ August 14, 2003, 10:07: Message edited by: Ruatha ]

Ruatha August 14th, 2003 11:53 AM

Re: OT:Is this the right forum for HTML help?
 
Another question, I added a timer counting down to the deadline, does the TIME() get's the time from my server or from the clients computer?

Now I've changed all old CGI scripts to PHP scripts, much better!

[ August 14, 2003, 12:40: Message edited by: Ruatha ]

tesco samoa August 14th, 2003 05:36 PM

Re: OT:Is this the right forum for HTML help?
 
http://us2.php.net/manual/en/ref.datetime.php

has all the differnt time functions.

Ruatha August 14th, 2003 07:05 PM

Re: OT:Is this the right forum for HTML help?
 
Thanks, but I don't find the answer myself to my question there. I guess it's the servertime.

Ruatha August 15th, 2003 09:28 PM

Re: OT:Is this the right forum for HTML help?
 
Now that I see how much easier PHP is than CGI that I used to use I start wondering about ASP, is that good?
there seems to be some things that can't be done in PHP that can be done in ASP.

Perhaps I'll check that and transform the site to ASP instead of PHP (instead of Perl/CGI), or what about Java/Javabeans and VB scripts, are those only clientbased?

I think I'll start by looking into ASP some.

BTW the site files can be found here:
http://www.shrapnelgames.com/cgi-bin...;f=23;t=009759


All times are GMT -4. The time now is 03:34 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.