SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict tedleonard's Avatar
    Join Date
    Jun 2000
    Location
    Dark side of the moon
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Hide Google Docs URL

    Hello,

    I have a password protected intranet website for my employees. In it, we have links to several read-only Google Docs which contain sensitive information (only viewable to those with the URL). Using a Google Doc makes it so easy since the document is edited so often and by so many non-tech people. The problem is that once you log into our password protected site and obtain the URL for those Google Docs, you can use the URL to access the docs whether or not you are logged into the password protected site.

    I'm looking for solutions to make it as difficult as possible to access this Google Doc URL without being logged into the password protected site. For example, if you are logged out, the URL for these documents are not accessible. Any ideas??

    Thank you for any help you could provide!!
    New Jerseyans: Beat your traffic ticket!
    http://www.njtrafficfines.com

  2. #2
    SitePoint Addict tedleonard's Avatar
    Join Date
    Jun 2000
    Location
    Dark side of the moon
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Forgot to mention (the reason I posted in the PHP forum)... I was thinking that when I present the user with the hyperlink to click to access this google doc, rather than take them directly to the google doc, it could point to a php script which downloads a fresh copy of the google doc to my server and converts it to a pdf using fpdf or the like. Then, the url they will be seeing will be to a pdf file on my server (in a password protected directory) rather than directly to the google doc.

    Which sounds great, except that my level of proficiency doesn't allow me to create such a php script. Does anyone know of a canned script somewhere which would allow me to accomplish this?

    Thank you!!
    New Jerseyans: Beat your traffic ticket!
    http://www.njtrafficfines.com

  3. #3
    SitePoint Addict
    Join Date
    Aug 2013
    Location
    New Zealand
    Posts
    274
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Just being nosey but why do you need it as a pdf? Are you planning on using the pdf security features?

    Sent from my XT316 using Tapatalk 2

  4. #4
    SitePoint Addict tedleonard's Avatar
    Join Date
    Jun 2000
    Location
    Dark side of the moon
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Only because a pdf file could be stored locally on my server, and consequently subject to .htaccess/.htpasswd restrictions, whereas once someone has the URL to the google doc they can access it whether or not they are logged into my site. In a nutshell, I want it so that if I revoke a user's access to the secure area of my website, they are no longer able to access these Google docs. At the same time, I do not wish to require each user to be also logged into Google to see the gdoc.

    If this could be accomplished more simply I would appreciate any suggestions!
    New Jerseyans: Beat your traffic ticket!
    http://www.njtrafficfines.com

  5. #5
    SitePoint Addict
    Join Date
    Aug 2013
    Location
    New Zealand
    Posts
    274
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I know Google docs has an embed code to the Google docs site. Of course that makes the url kind of visible for any htnl view of your web page. You may be able to fetch it with something like php curl and embed the response directly into your web page. Haven't tried it. Yself but it might work. It probably contains a lot of javascript code in the response but as long as it runs in the browser ok it should work I think.

    Sent from my XT316 using Tapatalk 2


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •