simulate ftp server by php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • saeed

    simulate ftp server by php

    hello

    I need a php file to simulate "ftp server" in port 80. (NO web based
    ftp)
    I want to connnet to my "php ftp server" with client program like
    "cuteftp" but in port 80.
    for example
    ftp server like this: http://www.mysite.com/test/ftp.php
    if you have any info, exmample, likn, please ... ???

    thanks
  • Jasper Bryant-Greene

    #2
    Re: simulate ftp server by php

    saeed wrote:
    [color=blue]
    > hello
    >
    > I need a php file to simulate "ftp server" in port 80. (NO web based
    > ftp)
    > I want to connnet to my "php ftp server" with client program like
    > "cuteftp" but in port 80.
    > for example
    > ftp server like this: http://www.mysite.com/test/ftp.php
    > if you have any info, exmample, likn, please ... ???
    >
    > thanks[/color]

    You can't do this. Your FTP client can't request /test/ftp.php as this
    requires it to do an HTTP GET for /test/ftp.php, but your FTP client
    uses FTP, not HTTP.

    It would be possible to write a FTP server using command-line PHP and
    have it listen on port 80, but you would connect to it with the FTP
    client by pointing it to [your server]:80, not by using an HTTP URL.

    This would be pointless, since it would be far easier and more efficient
    to use C, etc.

    --
    Jasper Bryant-Greene
    Cabbage Promotions

    Comment

    • Keith Bowes

      #3
      Re: simulate ftp server by php

      Jasper Bryant-Greene wrote:[color=blue]
      > saeed wrote:
      >[color=green]
      >> hello
      >>
      >> I need a php file to simulate "ftp server" in port 80. (NO web based
      >> ftp)
      >> I want to connnet to my "php ftp server" with client program like
      >> "cuteftp" but in port 80.
      >> for example ftp server like this: http://www.mysite.com/test/ftp.php
      >> if you have any info, exmample, likn, please ... ???
      >>
      >> thanks[/color]
      >
      >
      > You can't do this. Your FTP client can't request /test/ftp.php as this
      > requires it to do an HTTP GET for /test/ftp.php, but your FTP client
      > uses FTP, not HTTP.
      >
      > It would be possible to write a FTP server using command-line PHP and
      > have it listen on port 80, but you would connect to it with the FTP
      > client by pointing it to [your server]:80, not by using an HTTP URL.
      >
      > This would be pointless, since it would be far easier and more efficient
      > to use C, etc.
      >[/color]

      One could, however, make a PHP script that creates an HTTP directory &
      file viewer that approximates the functioning of an FTP client.

      Also, I don't believe for a second that writing a command-line Internet
      program in C is any easier than in PHP.

      Comment

      • saeed

        #4
        Re: simulate ftp server by php

        Jasper Bryant-Greene <jasp@fatalnetw ork.com> wrote in message news:<LfVYc.199 25$N77.787634@n ews.xtra.co.nz> ...[color=blue]
        > saeed wrote:
        >[color=green]
        > > hello
        > >
        > > I need a php file to simulate "ftp server" in port 80. (NO web based
        > > ftp)
        > > I want to connnet to my "php ftp server" with client program like
        > > "cuteftp" but in port 80.
        > > for example
        > > ftp server like this: http://www.mysite.com/test/ftp.php
        > > if you have any info, exmample, likn, please ... ???
        > >
        > > thanks[/color]
        >
        > You can't do this. Your FTP client can't request /test/ftp.php as this
        > requires it to do an HTTP GET for /test/ftp.php, but your FTP client
        > uses FTP, not HTTP.
        >
        > It would be possible to write a FTP server using command-line PHP and
        > have it listen on port 80, but you would connect to it with the FTP
        > client by pointing it to [your server]:80, not by using an HTTP URL.
        >
        > This would be pointless, since it would be far easier and more efficient
        > to use C, etc.[/color]

        hello
        thanks for answer
        is that possible with "perl" or other web language ???

        Comment

        • Jasper Bryant-Greene

          #5
          Re: simulate ftp server by php

          saeed wrote:
          [color=blue]
          > Jasper Bryant-Greene <jasp@fatalnetw ork.com> wrote in message news:<LfVYc.199 25$N77.787634@n ews.xtra.co.nz> ...
          >[color=green]
          >>saeed wrote:
          >>
          >>[color=darkred]
          >>>hello
          >>>
          >>>I need a php file to simulate "ftp server" in port 80. (NO web based
          >>>ftp)
          >>>I want to connnet to my "php ftp server" with client program like
          >>>"cuteftp" but in port 80.
          >>>for example
          >>>ftp server like this: http://www.mysite.com/test/ftp.php
          >>>if you have any info, exmample, likn, please ... ???
          >>>
          >>>thanks[/color]
          >>
          >>You can't do this. Your FTP client can't request /test/ftp.php as this
          >>requires it to do an HTTP GET for /test/ftp.php, but your FTP client
          >>uses FTP, not HTTP.
          >>
          >>It would be possible to write a FTP server using command-line PHP and
          >>have it listen on port 80, but you would connect to it with the FTP
          >>client by pointing it to [your server]:80, not by using an HTTP URL.
          >>
          >>This would be pointless, since it would be far easier and more efficient
          >>to use C, etc.[/color]
          >
          >
          > hello
          > thanks for answer
          > is that possible with "perl" or other web language ???[/color]

          You could do this with Perl, but you would need to program it as a
          server-side daemon, not as a web application.

          Web applications only run when they are requested by a client browser,
          and as such cannot actively listen on a port.

          --
          Jasper Bryant-Greene
          Cabbage Promotions

          Comment

          • R. Rajesh Jeba Anbiah

            #6
            Re: simulate ftp server by php

            saeed2999@yahoo .com (saeed) wrote in message news:<a43a05b0. 0408302249.526e 5f9d@posting.go ogle.com>...[color=blue]
            > hello
            >
            > I need a php file to simulate "ftp server" in port 80. (NO web based
            > ftp)
            > I want to connnet to my "php ftp server" with client program like
            > "cuteftp" but in port 80.[/color]

            1. http://nanoftpd.sourceforge.net/
            2. http://www.php.net/ftp
            [color=blue]
            > for example
            > ftp server like this: http://www.mysite.com/test/ftp.php[/color]

            That's not possible.

            --
            | Just another PHP saint |
            Email: rrjanbiah-at-Y!com

            Comment

            • saeed

              #7
              Re: simulate ftp server by php

              hello

              thanks to all answers

              I don't need file viewer or HTTP directory, I need a simple Script to
              simulate ftp server for upload file ... just that (I just want upload
              my file to my site in port 80)

              Comment

              • saeed

                #8
                Re: simulate ftp server by php

                hello
                thanks to all

                Comment

                Working...