4 Replies Latest reply on Jan 18, 2012 2:10 PM by sporobolus

    Using  PHP in a Filemaker script

    pedantic

      The conversion process actually went fairly well, but there's one sticking point. I use a plugin that will be unusable in Filemaker 11, the target conversion level. The plugin takes a picture and creates a thumbnail that can be stored in a Filemaker database. I've looked around and found a couple of plugins that might serve well as replacements, but what I would really like to try is this: I also found some PHP code that performs the same thing, without extra cost. Is there a way to call PHP code directly from the Filemaker script? If I could get away from using Applescript, I could make this script usable on both the Mac and Windows platforms and that would be considered a plus.

       

      TIA!

       

      John

        • 1. Re: Using  PHP in a Filemaker script
          databuzz

          Hi John,

           

          The only way I know of using PHP code from the context of a FileMaker script is to use one of the PHP FileMaker plug-ins. I've used the SmartPill PHP Edition with great success in the past:

           

          http://www.scodigo.com/products/smartpill-php

           

          HTH,

          Andrew

          • 2. Re: Using  PHP in a Filemaker script
            LyndsayHowarth

            Yes... As Andrew said...

             

            The php side of things would help if you were to store the thumbnails externally.. You could upload an image and resize/rename for thumbnails in the process... then update the record in the database with a filename/path as text. Inside the database the full path to the file could be then calculated and displayed in a web viewer or a container..

            or

            you could simple use the php code for resizing before you import the image...

             

            - Lyndsay

            • 3. Re: Using  PHP in a Filemaker script
              pedantic

              Thanks to the both of you.  FYI, the algorithm currently goes something like this:

               

              1.)  Identify path where all files are stored.

              2.)  Start loop.

              3.)  Call Applescript script

              4.)  In Applescript create thumbnail using standalone app (sorry--I really thought it was a plugin.  My bad.)

              5.)  Save thumbnail to a file named "Insertme.jpg"

              6.)  Insert into Filemaker database.

              7.)  Move to next record.

               

              Since then on my own I have also discovered a utility called GraphicConverter that may also fit the bill.   The good of it is that using it may minimize the amount of code I would have to revise.

               

              Again, thanks for your contributions

              • 4. Re: Using  PHP in a Filemaker script
                sporobolus

                on 2012-01-18 07:47 pedantic wrote

                 

                3.)  Call Applescript script

                4.)  In Applescript create thumbnail using standalone app (sorry--I really thought it was a plugin.  My bad.)

                 

                there are probably dozens of substitutes for the standalone app that could be

                called by the AppleScript, or from a shell script; you could even call

                command-line PHP from AppleScript, or directly