Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Communicating with remote database using a mac

Featured Replies

Hi,

I would like to be able query my remote database that's being hosted by FM Server on my Mac but I'm unsure about the best way to do this. Previously I've updated records but creating a simple php script that lives on the FM server and calling it using curl from my mac. Up until now I have always extracted data by opening the remote FM server database in FM Pro on my mac and using applescript to interact with records but if possible I would like to do the same without having to open the remote database using FM Pro. What would be the best way of doing this? should/could I run a php script on my mac that interacts with the remote database and returns me the results of a find or is there an easier/better way to do this?

 

Many Thanks,

Nik

 

Hi Captain_caveman,

I sent you a Private Message, please read it, make the updates requested, and reply.

TIA.

Lee

I moved the topic because you weren't posting a tip or technique, but rather had a question, which sounds like it might be relevant to
CWP but we'll need more info to be sure.

1. Why not use FileMaker Pro to "extract" data? Please explain a little more about your scenario.

2. I assume Lee has asked you to update your profile to tell use what version of FM client you're using, but also please tell us what version of server you've got and what kind of hosting environment.

Hi Tom,

As you know, questions to the Community Articles, Tips, & Techniques require approval by a Moderator before it can be posted in. Either our recent software upgrade has a glitch or one of the moderator approved it to post there before I got on this morning at about 7 am.  As you can see by my post,  I wrote a Private Message to captain_caveman, telling him that we would need to move it, along with some additional information regarding what his needs are, so we can be sure to move it to the correct topic, and requisition him to update his Profile information.

Lee

  • Author

Hi, I've just updated my profile.

FYI I'm running FM Pro 14 on a mac and FM Server 14 on a remote mac.

I have always used applescript with FM pro to extract data but the fact that I have to have FM Pro running I find a little clunky. As I mentioned I've successfully updated records by creating a php script that resides on the FM server and I call using the curl command from my Mac. I wandered if it was possible to extract data rather than just update data via curl or some other method without the need for FM pro to be running and having the database open on my mac? Can a PHP script run from my mac and interact with the FM server or do all php scripts have to be stored on the server to be able to interact?

 

Thanks,

Nik

 

I don't know enough about PHP or curl to completely answer your question.  However, I use RESTfm which is php and curl scripts that interact direct with a hosted FM Server database. RESTfm is under a open source license now.  So I used RESTfm to interact with a license server file that can be updated by web purchases adding licenses, license seats, and other items. The vertical market software I put out does a quick license check via RESTfm to allow access into the software. So we are pushing and pulling data from the file. Some using FileMaker via RESTfm and PHP direct from our webpage.  Hope that helps. 

Cheers,

Ben

Yeah, REST is a good approach -- built in to FM16 by the way, as are cURL commands.

Another option is CWP.

Another option is connecting via ODBC/JDBC.

  • Author

Hi Ben,

I've just installed RESTfm and it looks exactly what I'm after!!! I've just run a simple GET curl command and passed the result through a JSON helper app which is allowing me to extract the data I want.

Thanks so much for the pointer.

Nik

Hey Nik, I am so glad I could be of help.  Perhaps I can contact you on some PHP help sometime. :) 

 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.