1 Reply Latest reply on Jun 6, 2016 8:42 AM by CISDevTeam

    Accessing Container Data in PHP Custom Web Publishing

    User24618

      Title

      Accessing Container Data in PHP Custom Web Publishing

      Your post

      Hi all,

      I'm having issues with PHP CWP. The goal is simple: connect to a database, perform a find, arrange found records in a table.

      Problems arise with the last part: The database has some externally stored container data (pdf files, for the purpose of this web-app). I'm looping through found records and using 'getContainerDataURL($record->getField('Doc Container'))' to provide the href for an <a>. getContainerDataURL() does create a link to the file but when clicked, FM Server (presumably) asks the user to log in again. Even though the connection is already made.

      Obviously, I do not want to give random users the username and password used to log into the database. I was under the impression that when FM said that getContainerDataURL() creates "fully-qualified" URLs, it would just work without requiring signing in again. 

      My question: how do I link to a file in a secure container without requiring a second authentication when the user "leaves" my PHP-CWP site to open the file. 

      Any help is appreciated! Thank you! 

      - Joseph

        • 1. Re: Accessing Container Data in PHP Custom Web Publishing
          CISDevTeam

          Did you ever figure out the issue with this ?  Maybe using Basic Authentication by passing user/pass along with the URL as such:

           

          https://user:password@my.filemaker.server.com/fmi/xml/cnt/test.jpg?-db=test&-lay=cwp&-recid=3544&-field=Image


          Of course there are security considerations that should be able to worked out using this if you are working with data remotely.

           

          regards...

           

          Bob Minteer