Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post

    active, online zipping or rar'ing.

    i want to upload something through a form, and have the script do some sort of compression file, like:

    .zip
    .rar
    .tar.gz

    etc...

    if it makes any difference, it is a unix machine.

  • #2
    Regular Coder devinemke's Avatar
    Join Date
    Dec 2004
    Location
    NYC
    Posts
    443
    Thanks
    0
    Thanked 12 Times in 11 Posts
    PHP itself cannot do the compression but you can use PHP to execute any command line program you want using the Program Execution Functions. you just need to call the excutable to whatever compression app you are using with the required command line switches/arguments.

  • #3
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post
    can i get an example how to use it for my purposes?

    like how do i convert the .exe for something like winrar into unix to get it to work.

  • #4
    Regular Coder devinemke's Avatar
    Join Date
    Dec 2004
    Location
    NYC
    Posts
    443
    Thanks
    0
    Thanked 12 Times in 11 Posts
    you need to have the command line executable to whatever program you wish to use somewhere on your server and then feed that path to exec with whatever command line arguments your program expects to see.

  • #5
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •