473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

PHP - Gzip and System Command

Tom
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

Jul 17 '05 #1
6 2118
Tom wrote:
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


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 ?
Jul 17 '05 #2
Tom
On Sun, 23 Jan 2005 14:18:58 +0100, Stijn Verholen <st***@skynet.be> wrote:
Tom wrote:
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


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 ?

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
Jul 17 '05 #3
*** Tom escribió/wrote (Sun, 23 Jan 2005 12:47:39 +0000):
Is it possible to create a button that will gzip a file from a web page ??
Yes. Hints:

http://es2.php.net/manual/en/ref.zlib.php
http://es2.php.net/manual/en/function.exec.php
The have the page display another button, when the gzip is complete ??
You seen pretty concerned about buttons. It's as simple as:

<input type="button" ... >

:)

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


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
--
Jul 17 '05 #4
*** Tom escribió/wrote (Sun, 23 Jan 2005 19:47:26 +0000):
but I would have to go into the next room to un
gzip and reset the system.


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
--
Jul 17 '05 #5
system();

"Tom" <to**@adslweb.co.uk> wrote in message
news:o3********************************@4ax.com...
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

Jul 17 '05 #6
Tom
On Mon, 24 Jan 2005 10:17:31 +1300, "Hayden Kirk" <ha******@hotmail.com>
wrote:
system();

"Tom" <to**@adslweb.co.uk> wrote in message
news:o3********************************@4ax.com.. .
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

Thanks... I'll have a read... The probably some questions !!

Cheers
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Xah Lee | last post by:
today i need to use Python to decompress gzip files. since i'm familiar with Python doc and have 10 years of computing experience with 4 years in unix admin and perl, i have quickly located the...
2
by: comp.lang.php | last post by:
I am simply trying to zip together selected files into a single ZIP file. Windows XP doesn't have a native process by which you can do this, so I borrowed gzip, downloaded and installed, and upon...
1
by: poi | last post by:
I want to do an HTTP "GET" against a remote web server, and make sure that I get data back with gzip so the transfer is as fast as possible. It seems like gzip encoding only works with a "POST",...
9
by: Rajarshi | last post by:
Hi, I have some code that takes a string and obtains a compressed version using zlib.compress Does anybody know how I can remove the header portion of the compressed bytes, such that I only have...
9
by: flebber | last post by:
I was working at creating a simple program that would read the content of a playlist file( in this case *.k3b") and write it out . the compressed "*.k3b" file has two file and the one I was trying...
0
by: sarang | last post by:
Hi, I want to use gzip compression library in kernel module. I have source of of gzip library. I dont understand how to use this library in kernel module. Please suggest me easiest way to...
3
by: damezumari | last post by:
This is how I do a backup of a mysql database with php: $backupFile = '/home/owner/dbbackup/'.$dbname .'-' .$filename. '.sql'; $command = "mysqldump --opt -h $dbhost -u $dbuser -p$dbpass...
4
by: Aidan | last post by:
Hi, I'm having a bit of trouble with a python script I wrote, though I'm not sure if it's related directly to python, or one of the other software packages... The situation is that I'm trying...
6
by: pooppoop | last post by:
Hi, and thanks for viewing my post. i have an odd result when trying to compress and decompress a string. it seems that when i replace the Zero's in the input stream it works, if not the string...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.