User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,134 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,151 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1496 | Replies: 3
Reply
Join Date: Mar 2007
Posts: 17
Reputation: justinm is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
justinm justinm is offline Offline
Newbie Poster

download & extract .tar.bz2 to w/s from a http

  #1  
May 3rd, 2007
Want to download a .tar.bz2 and extract, then run the file into the database.
Eventually I will be setting up some sort of a crontab job thingmebob, but for the moment, I want to be able to extract the files successfully. I have not touched on streams or system before, and would like to dabble a bit, but am unsure how to do so.

Any help would be appreciated
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2006
Location: syria
Posts: 157
Reputation: w_3rabi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 8
w_3rabi's Avatar
w_3rabi w_3rabi is offline Offline
Junior Poster

Re: download & extract .tar.bz2 to w/s from a http

  #2  
May 5th, 2007
so the files in this tar files are sql or what??
could you explain the problem in alittle more detail
programming is an art ,only for those who can understand it.
- th3 php wr3nch -
Reply With Quote  
Join Date: Mar 2007
Posts: 17
Reputation: justinm is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
justinm justinm is offline Offline
Newbie Poster

Re: download & extract .tar.bz2 to w/s from a http

  #3  
May 7th, 2007
the files within the tar/gz are .csv files, with /t seperators.

I already have the script to read the files, and add them to the database, I want to know how to extract the .csv's from the archives first.
Reply With Quote  
Join Date: Dec 2006
Location: syria
Posts: 157
Reputation: w_3rabi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 8
w_3rabi's Avatar
w_3rabi w_3rabi is offline Offline
Junior Poster

Re: download & extract .tar.bz2 to w/s from a http

  #4  
May 7th, 2007
dude i checked the php manual and there is a plenty of functions
like [PHP]bzopen(),bzread(),bzdecompress()[/PHP]
what these do is open the file and read from and outputs a string of the file contents
since the files are separated by \t it looks an easy job u just need to now where the file names are (maybe the first line)
but i never tried this out
i think the manual could help more
programming is an art ,only for those who can understand it.
- th3 php wr3nch -
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 6:31 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC