PDA

View Full Version : FTP functions of PHP


2bz2p
07-08-2008, 02:33 PM
DJ,

So I know that PHP can act like an ftp program. So how about a tut on how to use those functions?

Thanks
2b

davidj
07-08-2008, 03:30 PM
food for thought

ill look into it

2bz2p
07-08-2008, 03:56 PM
cool, I need to learn more about it but i think its gonna be a crucial part to my app

thanks
2b

davidj
07-08-2008, 04:08 PM
what are you transfering

2bz2p
07-08-2008, 04:24 PM
This is a thought process for way down the road if this program picks up and is used through out the Virtual Airline community, but I was thinking of using it to do updates and a possible install aspect.

so for example:

Install.php - installs all the files and creates the db.

Updates.php - updates the old files and/or adds the new files to it

This why its easier for the user that dont know a whole lot about computers

davidj
07-08-2008, 04:26 PM
install in the same way as a forum installs on a server

2bz2p
07-08-2008, 04:31 PM
yeah thats were I got the idea from.

davidj
07-08-2008, 06:09 PM
you dont need ftp

you need installshield

http://www.acresso.com/products/installation/installshield.htm

2bz2p
07-08-2008, 06:34 PM
Isnt that for like windows based installs, not so much for php or website installs, I could be completely wrong though. I was thinking like SMF has there install.php and when you run it, you go through a series of forms and input your admin u/n and pass, the DB Prefix and database connection info. Then it creates the database and sets up the file structure and deletes the install.php at the end.

Thanks agian
2b

davidj
07-08-2008, 06:45 PM
install shield will install the db and the GUI or interface

2bz2p
07-08-2008, 06:49 PM
Huh.. Didnt know that, though could you install it on a shared hosting and all that aspect of it. the reason I ask is because this app will be completely web based and setup on the users hosting server (wiether that be their own or shared hosting).

davidj
07-08-2008, 09:33 PM
right

im with ya

you cant do it really as most hosts have different front end control panels and wont allow you to interact in that way

the best and simplist method is a good wiki or blog for support and some good READ ME files

2bz2p
07-08-2008, 10:53 PM
Yeah I will have a forums set on my site once this crazy contraption is done, though you know Simple Machine Forums is got the install and I am going to read it and see how they did it, when ever I get to that point lol. Though I think that if I can get to that point, I will be sitting pretty good with the php.

Thanks
2b

2bz2p
07-24-2008, 02:36 PM
So i am revisting this topic on another aspect of the application.

I found that with Flight sims they (Virtual Airlines) skin their own planes create their own landscapes/airports. These files when completed can be up to 50 megs and what I was trying to do is setup a file upload, but between having to edit the php.ini file and edit the size of the upload form feild and what it was a giant pain. So (not knowing) I was wondering if the PHP FTP fuctions would allow the uploads of these large files or even automatically break them into 2-3 zip files.

Thanks
2b

davidj
07-24-2008, 03:20 PM
i dont think you will find hosts allowing that level of upload

you could set your own server up and maintain your own hardware

2bz2p
07-24-2008, 03:45 PM
So how about this thought process, if the FTP'ed it from there comp to the server via an ftp program, How could I get the DB updated.

ideas:
Maybe a form that doest upload anything just updates the database with the file name for the link and does description and whatnot...

any thoughts are greatly appreciated, because I would like to find the simplest way to accomadate the larger files

Thanks again
2b

davidj
07-24-2008, 06:46 PM
you can scan a dir checking to see if new files have been added

you can do this using php

then if found perform a db update

2bz2p
07-24-2008, 07:22 PM
hey that would work... cool

I will throw a normal post up in the regular php board once I get to that point (which shouldb be soon)

Thanks
2b

davidj
07-24-2008, 08:03 PM
why do the users have to have a copy of this application

why cant you setup an app which users logon to

remember you cant write a script which scans a users dir structure because you dont know if they are allowed to do this

2bz2p
07-24-2008, 09:21 PM
AHHHH, (2b bangs his head against the wall) good point and earlier I was discussing this with a person I work with, My initial thought process was to sell the application to a Virtual Airline and let them install it to there server and what not, then like I said earlier my buddy at work said why dont you set it up as a service i.e. keep everything on my server then just give the end users a folder and maintain/DB for the program my self....

So hmm
Thanks
2b

Edit: I wanted to metioned that the directory would be part of the application, if that matters it wouldnt be a folder outside of the vpilot directory

davidj
07-24-2008, 09:37 PM
i recommend hosting it yourself

davidj
07-24-2008, 09:41 PM
addition

if you host the service yourself you have complete control and can iron out any bugs at your leisure without having to get all subscribers to install patches

you also keep that community together and by doing so create a social network this could then help deliver subscription based services

2bz2p
07-24-2008, 09:44 PM
Good point. Really good point.

Thanks
2b