title: Get Google Docs public link with PHP API
body: <p>I have a code to upload files to Google Docs using the Google Docs API. This files are uploaded to a public Collection, but, how can I get the public link to be published?</p>
  
  <p>After the complete upload I get:</p>
  
  <pre><code>SimpleXMLElement Object
  (
      [id] =&gt; https://docs.google.com/feeds/id/file%3A0B6yYgWS-CUJ2MDczZTRlY2YtZTRiMi00MWQ2LTliYjMtMDZiYWY0YjdjNjYw
      [published] =&gt; 2011-11-21T18:39:10.316Z
      [updated] =&gt; 2011-11-21T18:39:10.316Z
      [category] =&gt; SimpleXMLElement Object
          (
              [@attributes] =&gt; Array
                  (
                      [scheme] =&gt; http://schemas.google.com/g/2005#kind
                      [term] =&gt; http://schemas.google.com/docs/2007#file
                      [label] =&gt; application/zip
                  )
  
          )
  
      [title] =&gt; 4eca9acc2c339-4ec3b7436bed4-test2docx.zip
      [content] =&gt; SimpleXMLElement Object
          (
              [@attributes] =&gt; Array
                  (
                      [type] =&gt; application/zip
                      [src] =&gt; https://doc-14-88-docs.googleusercontent.com/docs/securesc/fcicpk40ckisatj1kultkrrcsbo6sba3/bnpt7i1b36sn91mta24etn98ou9ce2j0/1321900200000/11381682958832082931/11381682958832082931/0B6yYgWS-CUJ2MDczZTRlY2YtZTRiMi00MWQ2LTliYjMtMDZiYWY0YjdjNjYw?h=15825656760133770628&amp;e=download&amp;gd=true
                  )
  
          )
  
      [link] =&gt; Array
          (
              [0] =&gt; SimpleXMLElement Object
                  (
                      [@attributes] =&gt; Array
                          (
                              [rel] =&gt; alternate
                              [type] =&gt; text/html
                              [href] =&gt; https://docs.google.com/a/agaco.es/leaf?id=0B6yYgWS-CUJ2MDczZTRlY2YtZTRiMi00MWQ2LTliYjMtMDZiYWY0YjdjNjYw&amp;hl=en_US
                          )
  
                  )
          )
  )
  </code></pre>
  
  <p>But any of this links are a public link to publish in my web.</p>
  
  <p>From API v3 how can I get a link like <a href="https://docs.google.com/open?id=0B6yYgWS-CUJ2ZTUxZGI4MGUtMWM0Yy00YzY0LWIxOTMtMDFlN2RjNDAxNGM2" rel="nofollow">https://docs.google.com/open?id=0B6yYgWS-CUJ2ZTUxZGI4MGUtMWM0Yy00YzY0LWIxOTMtMDFlN2RjNDAxNGM2</a></p>
  
  <p>Regards,
  Lito.</p>