Log in

View Full Version : FTP with PHP



Jas
08-18-2007, 08:47 PM
I hate to resurect a thread (especially one of my own) but the answer I got last time didn't help me, as it turns out. . . So:

How do you use FTP with PHP (please don't refer me to the PHP manual, I already read it)? What I really need to know is:


How do I set it up if I am hosting the site myself? (Do I need to download something?)
What is my USERNAME/PASSWORD?
How do I set up the form/script?


I really need to know the first two. The third would just make a nice bonus if you have the time. :) I can already do the PHP upload, if that helps you determin how much info I need, but I am clueless with PHP and google didn't help. . .

Thanks everyone,

thetestingsite
08-18-2007, 09:01 PM
If you look at the post in your other thread (with the same title) that I posted, it expalins about setting up an FTP server using Filezilla. If you need further help with that, let me know and I will be glad to help out.

Jas
08-18-2007, 09:08 PM
I noticed that post :) but it really didn't help. How do I set it up for the server, how do I use it with php. . . .

*and it's a different title. FTP and PHP vs. FTP with PHP. lol

BTW, TestingSite, this is ocmpletely unrelated, but I don't want to start a new thread, so I'll just ask you: do you think it's worth the trouble to create a filter script for a forum (ie to block out certain words)? Or should my forum just be monitered?

thetestingsite
08-18-2007, 09:23 PM
First off, what type of server; or OS, are you running to host your website. I need specifics as to help you properly. Example:

Running Windows XP with Apache, PHP, Filezila FTP Server and hMailServer.

That's a decent example for me to help you. Perhaps someone else may be able to help you further; but without knowing what type of system you are running, we really are at a standstill.

Hope this helps nonetheless.

Jas
08-18-2007, 09:25 PM
Sorry! I didn't even think to mention that: the server will probably be a windows XP or Vista OS with apache/PHP and I suppose Filezilla ? I am open to whatever you suggest as long as it is compatible with windows XP and/or Vista. Do you need anything else?

thetestingsite
08-18-2007, 09:35 PM
Ok; with Windows XP running Apache with PHP, you would want to download and install Filezilla FTP Server (http://sourceforge.net/project/showfiles.php?group_id=21558&package_id=21737&release_id=489747) or FreeFTPD (http://www.freeftpd.com/?ctt=download) (whichever you prefer). After you have it installed the FTP server; and you have created a username/password, you can begin testing (beings that you are are a Windows system, PHP 4+ has FTP support enabled by default. If you run into problems, you may want to look into downloading and installing a pre-configured server suite to suit your needs. Probably NetServer (http://sourceforge.net/projects/netserver/) would be your best bet for an easy, clean install.

Hope this helps.

Note: I linked to all the websites you should need.

Jas
08-18-2007, 09:41 PM
A few questions: what is hMailServer ? When I setup filezilla, it will ask me at the end of setup what my username/password will be, and then it will all work (with localhost and my future server)? What should I be doing with the PHP script to make it work with filezilla?

thetestingsite
08-18-2007, 09:55 PM
what is hMailServer?

hMailServer (http://www.hmailserver.com) is an email server. To learn more about it, go to their website.



When I setup filezilla, it will ask me at the end of setup what my username/password will be, and then it will all work (with localhost and my future server)?


It's been a while since I set up Filezilla, but I think after you set it up you will have to add a user yourself. The way you do this is by clicking on the "User Administration button. Then click "Add". After doing so, enter the username for the user you wish to create; then click "OK". After that, you will click on "Enable Password" and enter in a password (if you wish to do so). Then click on the link that says "Shared Folders". Click "Add", and choose the directory in which you want the user to access; then click "Ok". Finally, click "OK" at the bottom left side of the User Admin area and that's it. Test the account to make sure it works and your done.


What should I be doing with the PHP script to make it work with filezilla?

As for the PHP script, all you need to do is follow the FTP instructions in the PHP manual (spelling?). Be sure to look at the comments for specific scripts that pertain to this. You could also do a Google search on "FTP commands using PHP".

Hope this helps.

Jas
08-18-2007, 10:19 PM
I've said it before, but your amazing! I will see if it works. (It might take a couple of days for me to actually finish creating the script and what-not-- I've been busy over the summer). Thanks for ALL of your help.

Twey
08-19-2007, 08:08 AM
the server will probably be a windows XP or Vista OS with apache/PHP and I suppose Filezilla ? I am open to whatever you suggest as long as it is compatible with windows XP and/or Vista.A Windows server? Yuck. Server setup tends to be a lot easier on Linux.

tomyknoker
08-21-2007, 11:56 AM
Actually I have a question about this... FTP with PHP, I have seen a few site's where there is a client login section, this is an example http://ftp.whirlwindprint.com/Login, sign is as guest / guest. What I don't get is, is this just simply php pages talking to a database with a user guest / guest or is this actually using something special when combining with PHP and FTP?

Twey
08-21-2007, 12:46 PM
No way of knowing without access to the source code. If it's logging you into an FTP account, chances are it's using FTP for authentication.