6 Replies Latest reply on May 14, 2012 10:36 AM by DonClark

    FileMaker and PHP Questions...


      I sell products online and the company that runs the e-marketplace keeps track of Customers and Transactions. I am able to export the customer and transaction data to .csv files and then import them into FM, no problem. However, they offer an API to access my data via PHP. I'm not completely familiar with FM and PHP, but my understanding is that it is for displaying FM data on other web-based applications. Is it possible to have newly added orders and customers added to my filemaker db via their PHP API? Or can someone recommend another option? I'm using FM12 Advanced and, if needed, FM Server 12.



        • 1. Re: FileMaker and PHP Questions...

          Hi jda,


          Many websites use MySQL tables for their online transactions. If that's the case with your website, then the ESS capabilities of FMP could be a more direct way of pulling the data into your FM database than doing the PHP programming needed to interface with their API.


          All you need to do is get Read Only access privileges from your hosting company, set up the DSN in the ODBC Administrator app, then put the MySQL tables on your Relationship Graph.


          I hope this helps,



          1 of 1 people found this helpful
          • 2. Re: FileMaker and PHP Questions...

            In my experience, the companies offering php and mysql will not allow direct access to mysql tables, even with read only permissions. If they do, then Johnm's answer is a good one. 


            You can, however, use FM PHP to communicate (which requires FM 12 Server Advanced, by the way).  The API they offer will usually have special commands for you to use, and you'll usually have to devise a way to retrieve the data you want using their commands and store it in variables or arrays, then use the FM API commands to upload it to FileMaker from those storage areas.  It will be a bit complicated to set up, but it is doable.


            Don Clark

            FM Database Consulting

            1 of 1 people found this helpful
            • 3. Re: FileMaker and PHP Questions...

              I agree with Don's first para. Most ISPs will not allow you to access MySQL (or SQL) tables even for read only.


              Second paragraphs states that FMServer 12 Advanced is required for FM API for PHP and making FileMaker a datasource for you to "push" the records into. FMServer 12 OR FMServer 12 Advanced can be used for this.


              Also, this would mean that you have access to the Web Site files (which often times ISPs don't allow this either!) and can create the necessary php to push the data into FM.


              jda, research their "api" for accessing your data. I bet it's something like PHPMyAdmin or something similar to get at the MySQL data. That doesn't necessarily mean that you'll be able to connect FM to it. Just reach what they offer and let us know?



              • 4. Re: FileMaker and PHP Questions...

                Hi Beverley & Don,


                Please excuse my ignorance here, but is there any valid reason why a company that provides web hosting for "my data" on "my website" won't allow Read-Only access to the MySQL tables?


                I realise that there might be the traditional suspicion over FileMaker not being a "proper" DBMS but what their other reasons?



                • 5. Re: FileMaker and PHP Questions...

                  That's just "typical" as most of the time you don't have your own server. It's SHARED hosting (web sites and databases). And it's possible to allow access, it's just not as common. Sometimes the ports are blocked, so that only the web server(s) can communicate with the SQL server(s). There are security issues with this kind of shared hosting that need to be addressed, and allowing you access may present vulnerabilities that the other sites don't want.


                  If you co-locate (your box, their location), then you have total access. And it's more expensive and you may or not be totally responsible for things like backup, updates, etc.


                  FileMaker has nothing to do with this equation. I work with a lot of ISP's and I was an ISP for 10 years.


                  Check with the ISP and see what kind of ODBC you can use to get to the data. Then we'll talk.



                  • 6. Re: FileMaker and PHP Questions...

                    Part of the reason also is that most e-marketplace companies have developed an API that lets you search, insert, update, and delete (in some instances) data, and they can control access to all customers through that one API, making their support task much easier. 


                    And thank you Beth, for the heads up on the php access.  I confused it with IWP and odbc connections, which do require Advanced server.