Jump to content

Recommended Posts

Ok, my issue is that when using cURL to download a request to google docs, using cURL option file transfer, it downloads immediately. This means that all I really end up saving is a loading screen.

 

So I guess my question is, is there a way to make cURL wait untill the page at google docs is complete? Or is there a better solution? I basically want to store a local copy of what google docs produces, so next time a user needs to view that document, they dont have to wait for loading time.

 

Here is curl request im using:

 

            // Download the file from google docs
    $fh = fopen(DIR_DOWNLOAD . '/database/' . $fileName . '.html', 'w');
    $ch = curl_init($docsFile);
    curl_setopt($ch, CURLOPT_FILE, $fh);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_exec($ch);
    print_r(curl_getinfo($ch));
    curl_close($ch);
    fclose($fh);

 

Link to comment
https://forums.phpfreaks.com/topic/258888-curl-download-google-docs/
Share on other sites

Can someone advise, the way I need to use the API is basically like this:

 

I will be setting a cron job to send a bunch of documents to google docs to parse them

 

I then want to retrieve the documents that google has parsed into images, i imagine using the download document method in the API.

 

However, googles documentation on obtaining an OAUTH token falls short here. Can someone point me to an example of requesting an OAUTH token to my own account? If I even need that?

 

I have the access key etc, but knowwhere does it explain how I actually permit myself access, at least I cant find it.

https://docs.google.com/viewer

 

You realise google have their own format for documents? It's not a simple .doc format. I was at a google event in London recently where they explained all their future plans etc and how they want to hold everyone's documents in a central location.

https://docs.google.com/viewer

 

You realise google have their own format for documents? It's not a simple .doc format. I was at a google event in London recently where they explained all their future plans etc and how they want to hold everyone's documents in a central location.

yeah, and not just their documents either....muhahahaha!

It wouldn't surprise me but they were reluctant to discuss anything other then their docs at this particular event. I did question however, what would happen if - in the very unlikely and possibly impossible - google crashed and burned. Every-bodies documents would go  :psychic:

I'd be more concerned with the more plausable "what happens to the information if Google sells out to or merges with A. N Other company"?  what protection do users have against said company accessing and using documentation that is stored on googles servers? 

 

anyway, hijack incident over I think, everyone can go back to their normal routine, move along, nothing to see here....

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.