• Help
  • Search
  • Login
  • Register
  • Home

Forum: web design and graphics community

Celestial Star Forum > Web Development > Coding > unzip
Pages: [1]
« previous next »
  Print  
Author Topic: unzip  (Read 1283 times)
fedekiller
Shelter
****
Posts: 204



View Profile WWW
unzip
« on: February 20, 2006, 04:26:46 PM »

is there a php code to unzip a file? or unrar xD
Logged
Blackstone
Administrator
Valkyrie Randgris
*****
Posts: 821

Oh look! People!


View Profile
unzip
« Reply #1 on: February 20, 2006, 04:47:26 PM »

Ermm.... PHP code? I don't know of any... x.x
Logged
fedekiller
Shelter
****
Posts: 204



View Profile WWW
unzip
« Reply #2 on: February 20, 2006, 07:25:16 PM »

Weeee i got it :P but its for rar files xD

Code:
<?php

$rar_file 
= rar_open&#40;'example.rar'&#41; or die&#40;"Failed to open Rar archive"&#41;;

$entry = rar_entry_get&#40;$rar_file, 'Dir/file.txt'&#41; or die&#40;"Failed to find such entry"&#41;;

$entry->extract&#40;'/dir/to'&#41;; // create /dir/to/Dir/file.txt
$entry->extract&#40;false, '/dir/to/new_name.txt'&#41;; // create /dir/to/new_name.txt

?>
Logged
Blackstone
Administrator
Valkyrie Randgris
*****
Posts: 821

Oh look! People!


View Profile
unzip
« Reply #3 on: February 20, 2006, 07:43:09 PM »

Ooo, great, okay, sweet xD
Logged
fedekiller
Shelter
****
Posts: 204



View Profile WWW
unzip
« Reply #4 on: February 20, 2006, 08:30:44 PM »

but im not sure how it works.. xD
Logged
Blackstone
Administrator
Valkyrie Randgris
*****
Posts: 821

Oh look! People!


View Profile
unzip
« Reply #5 on: February 20, 2006, 08:37:22 PM »

Well, erm... I'm not exactly the best at PHP (I'm just starting to learn). x.x Where did you get the code? It might tell you how to use it somewhere...
Logged
fedekiller
Shelter
****
Posts: 204



View Profile WWW
unzip
« Reply #6 on: February 20, 2006, 09:33:50 PM »

www.php.net/rar xD but i have an error...it doesnt recognise rar_open function...
Logged
Vangs
Administrator
Valkyrie Randgris
*****
Posts: 525



View Profile WWW
unzip
« Reply #7 on: February 23, 2006, 06:49:40 AM »

The rar_open() function is in beta at the minute only. I'm not sure if they're going to support it or not for it has been like that for quite some time. Regardless, if completed, it'll be in a high version of PHP, so your server would need to be running it to run the function correctly.
Logged

Pages: [1]
  Print  
« previous next »
 
Jump to:  

  • Welcome, Guest
  • Members login
  • Register for free

General

  • General
  • New members
  • Announcements
  • Support / Suggestions

Art boards

  • Creative mediums
  • Requests and offers
  • Tutorials
  • Celestial Star tutorials

Web development

  • Coding
  • Web design
  • Advertisements / affiliation

Off-topic

  • The non-sense
  • Ententainment

Go up
eXTReMe Tracker
  • Valid XHTML
  • Valid CSS
Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC | Seo4Smf v0.2 © Webmaster's Talks
Loading...