Page 1 of 1
web based ftp...
Posted: Wed Apr 07, 2004 7:41 pm
by Illusionist
before i get into my next project, there are a few questions, well one really, that i need answered.
My school blocks almost ALL ports. So i have no ftp access, or anything. The only ports they open are 80 and a few others for the boarders that play games. Other than that they block all others. I was wodnering though, would it be possible to create a php application with ftp commands to connect to my local ftp server and access it from my picky school? This question may/may not make much sense, but hopefully someone may understand it and can give me a reasonable answer!
Thanks
Posted: Wed Apr 07, 2004 9:43 pm
by TheBentinel.com
You'd need to have your PHP script download/upload the files to your server, then send them on to the target server, so it won't be exactly like FTP, but yeah, you could do it. You'd probably have to handle all the FTP stuff yourself with sockets. PHP doesn't have native FTP support, does it?
Posted: Wed Apr 07, 2004 10:18 pm
by Illusionist
http://www.php.net/ftp
and why would i have to download/upload anything?? That doesn't make sense...
Posted: Thu Apr 08, 2004 8:27 am
by TheBentinel.com
That's incredible, PHP just doesn't stop impressing me. Kicks ASP's butt all day long.
You're behind a firewall that's only allowing you port 80 access. So you can get out to your web server, but that's it. Your web server can get to your FTP server. So you need to create a web system that lets you remotely manipulate the FTP session you create in PHP.
You <--> Your Web Server <--> Your FTP server
to get a file from your FTP server, you need to first bring it to your web server (FTP get), then send it to You (via HTTP download)
To send a file to the FTP server, the opposite: Upload it via HTTP to your webserver, then send it on to the FTP server via put.
I assume your FTP server and your web server are different machines. If your FTP server and your web server are the same machine, then you don't need FTP at all, do you?
Posted: Thu Apr 08, 2004 8:33 am
by magicrobotmonkey
another thing - depending on what kind of access you have to your web server or even your FTP machine, you can easily change the ports. They're not set in stone you know! Change the ftp server to listen on port 80 and then from your machine:
ftp://host:80
simple!
Posted: Thu Apr 08, 2004 10:58 am
by kettle_drum
Or you could run a bouncer on your home computer so it connects you through to where you really want to go. Or run php shell. Or infact just have telnet or ssh listen on port 80 and connect to that from school.
Posted: Thu Apr 08, 2004 10:59 am
by magicrobotmonkey
Yea, ive been behind blocked ports before and its always a good time trying to hook up to all the services i wanted! For a REAL good time, try hosting a site over DSL with a dynamic IP and port 80 blocked!