Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

open Zip and CSV files with php?

Posted on 2011-03-14
3
Medium Priority
?
317 Views
Last Modified: 2012-05-11
I want to send an api request using the youtube api but I am unsure how I would be able to read the information returned by the request.

Youtube states that the request will return a zip file with a bunch of .csv files in it depending on your request.

Is it practical to think that I will be able to send the request read the zip file and grab the contents of the .csv files on the fly?

This is stuff that I want to be accessible to those that will be logged in to my app. Could php do this type of action and quickly?

Here is the link to the google/youtube api that is specific to my question. Thanks.

http://code.google.com/apis/youtube/2.0/developers_guide_protocol_insight.html
0
Comment
Question by:Solutionabc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
dsmile earned 2000 total points
ID: 35135003
There're many classes available for you to unzip & read csv using php.
Just google it or go here http://www.phpclasses.org/

For the unzip part, I suggest that you use unzip tool on your server (gzip on Linux or 7z on both Linux and Windows) to get highest performance.

And the scenario should be like this:
1. request youtube api to get and save zip file to you host.
2. unzip zip file
3. loop through csv and read the content then return to user
0
 

Author Comment

by:Solutionabc
ID: 35135090
Preferably I would want the information inside the zip file to be available as soon as the person logs in. Would there be a time delay in downloading the zip and reading the content?
0
 
LVL 13

Expert Comment

by:dsmile
ID: 35136386
I think the only delay is time consumed by saving the zip file to your host.
That "on-the-fly" you're talking about may result in incomplete zip file that couldn't be openned anyway.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question