PHP - Gzip and System Command

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

    #1

    PHP - Gzip and System Command

    Is it possible to create a button that will gzip a file from a web page ??

    The have the page display another button, when the gzip is complete ??

    The button should allow us to issues a system command.. ie: power off !

    can this be done ?

    Cheers

  • Stijn Verholen

    #2
    Re: PHP - Gzip and System Command

    Tom wrote:[color=blue]
    > Is it possible to create a button that will gzip a file from a web page ??
    >
    > The have the page display another button, when the gzip is complete ??
    >
    > The button should allow us to issues a system command.. ie: power off !
    >
    > can this be done ?
    >
    > Cheers[/color]

    PHP is typically used for parsing content on a website. As such, it is
    impossible to execute any command on a remote host. Quite logical, since
    the data that is sent to a client is html, which does not provide an
    interface to the underlying system.

    If, on the other hand, the client is running some internet accessible
    service that handles incoming requests to locally gzip, power off, etc.,
    PHP can talk to it. Based on your post, I don't think that this is the
    case.

    I'm curious, what exactly do u need this for ?

    Comment

    • Tom

      #3
      Re: PHP - Gzip and System Command

      On Sun, 23 Jan 2005 14:18:58 +0100, Stijn Verholen <stijn@skynet.b e> wrote:
      [color=blue]
      >Tom wrote:[color=green]
      >> Is it possible to create a button that will gzip a file from a web page ??
      >>
      >> The have the page display another button, when the gzip is complete ??
      >>
      >> The button should allow us to issues a system command.. ie: power off !
      >>
      >> can this be done ?
      >>
      >> Cheers[/color]
      >
      >PHP is typically used for parsing content on a website. As such, it is
      >impossible to execute any command on a remote host. Quite logical, since
      > the data that is sent to a client is html, which does not provide an
      >interface to the underlying system.
      >
      >If, on the other hand, the client is running some internet accessible
      >service that handles incoming requests to locally gzip, power off, etc.,
      > PHP can talk to it. Based on your post, I don't think that this is the
      >case.
      >
      >I'm curious, what exactly do u need this for ?[/color]


      Hi

      I want to run gzip and power off, on the server..

      Its to allow me to remotely upgrade one of my network servers..

      I've created a password protected page, that allows me to upload an amended
      system config.

      This needs to be un - gzipped and then the system rebooted. I can do this
      from with in my office, but I would have to go into the next room to un
      gzip and reset the system.

      If it can be done from a web page, I don't have to get out of my chair ! :)

      Any ideas ?

      Thanks

      Comment

      • Alvaro G. Vicario

        #4
        Re: PHP - Gzip and System Command

        *** Tom escribió/wrote (Sun, 23 Jan 2005 12:47:39 +0000):[color=blue]
        > Is it possible to create a button that will gzip a file from a web page ??[/color]

        Yes. Hints:



        [color=blue]
        > The have the page display another button, when the gzip is complete ??[/color]

        You seen pretty concerned about buttons. It's as simple as:

        <input type="button" ... >

        :)

        [color=blue]
        > The button should allow us to issues a system command.. ie: power off ![/color]

        If it's a Unix server, use 'sudo'.


        --
        -+ Álvaro G. Vicario - Burgos, Spain
        +- http://www.demogracia.com (la web de humor barnizada para la intemperie)
        ++ Manda tus dudas al grupo, no a mi buzón
        -+ Send your questions to the group, not to my mailbox
        --

        Comment

        • Alvaro G. Vicario

          #5
          Re: PHP - Gzip and System Command

          *** Tom escribió/wrote (Sun, 23 Jan 2005 19:47:26 +0000):[color=blue]
          > but I would have to go into the next room to un
          > gzip and reset the system.[/color]

          telnet and ssh do not apply?


          --
          -+ Álvaro G. Vicario - Burgos, Spain
          +- http://www.demogracia.com (la web de humor barnizada para la intemperie)
          ++ Manda tus dudas al grupo, no a mi buzón
          -+ Send your questions to the group, not to my mailbox
          --

          Comment

          • Hayden Kirk

            #6
            Re: PHP - Gzip and System Command

            system();

            "Tom" <tomt@adslweb.c o.uk> wrote in message
            news:o377v05b9k ktrii16ukaoi817 pv3uh2101@4ax.c om...[color=blue]
            > Is it possible to create a button that will gzip a file from a web page
            > ??
            >
            > The have the page display another button, when the gzip is complete ??
            >
            > The button should allow us to issues a system command.. ie: power off !
            >
            > can this be done ?
            >
            > Cheers
            >[/color]


            Comment

            • Tom

              #7
              Re: PHP - Gzip and System Command

              On Mon, 24 Jan 2005 10:17:31 +1300, "Hayden Kirk" <hayden90@hotma il.com>
              wrote:
              [color=blue]
              >system();
              >
              >"Tom" <tomt@adslweb.c o.uk> wrote in message
              >news:o377v05b9 kktrii16ukaoi81 7pv3uh2101@4ax. com...[color=green]
              >> Is it possible to create a button that will gzip a file from a web page
              >> ??
              >>
              >> The have the page display another button, when the gzip is complete ??
              >>
              >> The button should allow us to issues a system command.. ie: power off !
              >>
              >> can this be done ?
              >>
              >> Cheers
              >>[/color]
              >[/color]
              Thanks... I'll have a read... The probably some questions !!

              Cheers

              Comment

              Working...