Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#215254 - 04/05/2004 14:55 how to (need code for dynamic HTML)
Whitey
member

Registered: 09/03/2002
Posts: 178
Loc: Louisiana, USA
I'm getting ready to leave for my internship in North Africa in a few months. In the mean time I will be living in Shrevport, Louisiana for the summer. I have already sold most all of my possestions on Ebay so that I don't have to pay a crazy storage bill while I am gone. I need to have access to certian files from anywhere in the world I am, so I'm going to upload the critical info to my webspace.

I want to have a link in my site that will show all files in this space without having to code and recode everytime I add a file or change a file name. I would just put them into the FTP site, but I'm not always sure that I will be in front of a computer with an FTP client.

So, I am reasonably sure that this can be done, I just dont know how. I know I need to write something that scans the directory server side then writes code client side. other than that I dont know where to begin. This sounds like a PHP sort of thing, but I'm still new to all of this so I require a little (not much) hand feeding.
Thanks.......
_________________________
_______________________________________ former owner...now I'm just another schmuck

Top
#215255 - 04/05/2004 14:58 Re: how to (need code for dynamic HTML) [Re: Whitey]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
One, most (all?) browsers are ftp clients, if not particularly good ones.

Two, most (all?) web servers can generate directory listings.

Three, your bigger problem is probably how to add new data.
_________________________
Bitt Faulk

Top
#215256 - 04/05/2004 15:09 Re: how to (need code for dynamic HTML) [Re: Whitey]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
To expand upon what Bitt said...

If you don't set the web server to explicitly deny the permission to "browse" directory listings, then you can see the contents of a web subdirectory simply by surfing to the URL of that directory. No server side coding needed.

Depending on which web server software is used on that server, it might be controlled by a hidden configuration file you place in that folder, or it might be configured some other way on the server. You might have to ask your hosting provider how to enable directory browsing on your web site.

If you do this, however, make sure not to store a file in that folder called "index.htm" or "index.html" or "index.php" something like that. Because if you do, then the web server will display that file instead of the directory listing. (And by the way, which sets of file names are counted as index pages is also something that's configured on the web server.)
_________________________
Tony Fabris

Top
#215257 - 04/05/2004 15:42 Re: how to (need code for dynamic HTML) [Re: Whitey]
Cybjorg
addict

Registered: 23/12/2002
Posts: 652
Loc: Winston Salem, NC
There are easy third party PHP scripts that will allow you to view the contents of a online folder, as well as upload a file without the need of an FTP client. This way, you can deny permissions to most folders while only the ones containing the PHP file are open to the public.

Top
#215258 - 04/05/2004 16:25 Re: how to (need code for dynamic HTML) [Re: Cybjorg]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
You can also do that with most web servers out of the box. But whatever works for you.
_________________________
Bitt Faulk

Top
#215259 - 04/05/2004 19:26 Re: how to (need code for dynamic HTML) [Re: wfaulk]
Whitey
member

Registered: 09/03/2002
Posts: 178
Loc: Louisiana, USA
Thanks for getting me straight fellas.


Edited by Whitey (04/05/2004 19:26)
_________________________
_______________________________________ former owner...now I'm just another schmuck

Top
#215260 - 04/05/2004 19:37 Re: how to (need code for dynamic HTML) [Re: Whitey]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
If you let us know what kind of web server you're using, we can potentially offer more advice, assuming you need it. For example, under Apache, the relevant configuration options are "Options +Indexes", "DirectoryIndex", all the mod_autoindexing options, and the "<Directory>" limiter and/or the fact that you can put options in specific directories' .htaccess files.
_________________________
Bitt Faulk

Top
#215261 - 05/05/2004 05:29 Re: how to (need code for dynamic HTML) [Re: wfaulk]
Whitey
member

Registered: 09/03/2002
Posts: 178
Loc: Louisiana, USA
I am using apache. I just tried the indexing function and it appears to be turned on. I think that will be the solution to my problem.

Now that I have that fixed....I am using Foxfire to download a few very big files, and It keeps writing them to the default C:\temp\whatever.exe and then writing it to it's final destination. The download is failing becasue I dont have enough room on that disk. Is there a way to force Foxfire to write to the final destination, or can I change the location of the temp files?

Seems like the questions never stop.

_________________________
_______________________________________ former owner...now I'm just another schmuck

Top
#215262 - 05/05/2004 09:56 Re: how to (need code for dynamic HTML) [Re: Whitey]
RobotCaleb
pooh-bah

Registered: 15/01/2002
Posts: 1866
Loc: Austin
perhaps you mean Firefox

and sorry, cant help with the temp issue

Top
#215263 - 05/05/2004 09:59 Re: how to (need code for dynamic HTML) [Re: Whitey]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
The location of the temporary folder is controlled by the operating system. If you are running Windows NT/2000/XP, that's an environment variable called TEMP. You set the environment variables in the system properties advanced tab.
_________________________
Tony Fabris

Top
#215264 - 05/05/2004 12:07 Re: how to (need code for dynamic HTML) [Re: tfabris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Can anyone explain to me the purpose of writing to a temporary directory and moving it instead of just writing it to the right place to begin with? I can't come up with any reasons and it causes a number of problems.
_________________________
Bitt Faulk

Top
#215265 - 05/05/2004 12:16 Re: how to (need code for dynamic HTML) [Re: wfaulk]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
According to what I've read, Mozilla just downloads to the temp directory while you're confirming the real save directory and filename and then immediately moves it over. Maybe that's not what happens under Firefox. Or maybe it's different if they're on different filesystems. Anyway, have you gotten to the point where you accept a filename?
_________________________
Bitt Faulk

Top
#215266 - 05/05/2004 12:41 Re: how to (need code for dynamic HTML) [Re: wfaulk]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
Can anyone explain to me the purpose of writing to a temporary directory and moving it instead of just writing it to the right place to begin with?
Yes. Because Joe Sixpack might try to open the file before it's finished downloading all the way.
_________________________
Tony Fabris

Top
#215267 - 05/05/2004 13:00 Re: how to (need code for dynamic HTML) [Re: tfabris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
And the downside of this would be... ?
_________________________
Bitt Faulk

Top
#215268 - 05/05/2004 13:10 Re: how to (need code for dynamic HTML) [Re: wfaulk]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
Joe sixpack would (a) get an error message from whatever app he tried to open it with, or (b) possibly, depending on the application he opened it with, cause the file to become locked so that it can't be written to any more, thus preventing the browser from being able to continue the download.
_________________________
Tony Fabris

Top
#215269 - 05/05/2004 13:16 Re: how to (need code for dynamic HTML) [Re: tfabris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Oh, yeah. I forgot how fucked-up Windows' file locking is.
_________________________
Bitt Faulk

Top
#215270 - 05/05/2004 13:43 Re: how to (need code for dynamic HTML) [Re: RobotCaleb]
Whitey
member

Registered: 09/03/2002
Posts: 178
Loc: Louisiana, USA
I did mean Firefox.

And thanks Tony. I knew there was something I could do about it.
_________________________
_______________________________________ former owner...now I'm just another schmuck

Top