5 Replies Latest reply on Feb 2, 2012 4:30 PM by stefansmith2008@me.com

    Help with sending HTTP request

    stefansmith2008@me.com

      Hello everyone,

       

      I am in desparate need of help in trying to solve the following problem. For my manufacturing business, I have developed a rather large solution. We run FileMaker Server v11 / some desktops (Mac's) and iPad's out in our factory. And for those involved in admin or out on the road, we all have iPhone's.

       

      On the iPhone we all use Prowl. Prowl (a la Growl) we use because it is the only way I have found to get notifications onto the screen of the iPhone. Sending ordinary email gets missed and so we need a notification process on the iPhone that is in your face!

       

      FileMaker Server is scheuled to run scripts that uses the Prowl email facility to send notifications to employee's iPhone's. An email is sent to Prowl instead of their ordinary email account to convey important messages.

       

      Prowl has an http protocol that allows messages to be sent instead of using email.

       

      The Prowl API --- I do not understand! BUT - I know how to construct the HTTP string. If I copy and paste the string into a web browser, I get the desired results.

       

      Equally, I know how to write a script in FileMaker that uses the OpenURL function. I construct a $url variable into the required format from data inside of our database.

       

      But, here are my issues:

       

      1. The Open URL function opens a web browser page. I don't want this.

      2. The Open URL function does not run from FileMaker Server - which is where I need it to run.

      3. I am aware of plug-ins e.g. 360Works, that allow the Open URL function to work server side; I am also aware that 360Works have a Prowl API custom function. But, I do not want to install any plug-ins.

      4. The email to Prowl feature works ok --- providing there are no SMTP issues. And we do get these from time to time.

       

      So, where am I going with this.....I know on FileMaker Server on our MacMini that it is possible to run system scripts at pre-determined times.

       

      Given I am an idiot, I really just want to construct the URL string in FileMaker and have the system script literally send the HTTP request as http://<my string from FileMaker>

       

      But I have no clue how to do this. I have reserched for many hours on the Internet but I am totally lost. PHP; Pearl etc mean nothing to me.

       

      Can anyone spare a few minutes to explain (a) if this is possible and (b) how this may be done?

       

      I hope this makes sense.

       

      Thanks in advance

        • 1. Re: Help with sending HTTP request
          jrenfrew

          Wondering why you wish to eschew a solution simple and elegant in its execution and perfect in a production environment that 'might' be a plug in but is free??

           

          Scriptmaster with Prowl I venture to suggest is going to save lots of pain

          • 2. Re: Help with sending HTTP request
            reelsteve

            hola,

             

            ill give u my solution and u can try it on for size.  u r wise to steer clear of plug ins.

            ur solution is clearly heavy on the fm go side of things and given their lack of plug in support,

            ur decision to solve this on a desktop using a plug in comes with accepting that ur fmgo clients wont have the ability to push to growl or u will have to create an alternate solution which will work with go leaving u with an unnecessary splinter line in ur solution.

             

            dont use open url.  use set web viewer.

            u have 4 optional actions to use with this function.

            here is my standard rollout of this.

            make a super small webbiewer.  name it (in the properties inspector).

            create a return display text field.

            setup a script that starts with set variable which u will assign to ur  concactonated url which u can either hard code, or src from an unstored calc field so u r left with an agnostic

            web service antenna.  next step, use set web viewer and put ur webviewer's name in the target field.

            choose open url (or maybe its goto url? on my phone right now) as the action option within the set web viewer script step and use ur variable as the url target.

            this will accomplish the get call.  if u simply keep ur web viewer big, ul see the reponse (if there is one).

            My approach is to keep it microSmall then add an additional script step of set variable $return  value = GetLayoutObjectattribute ("name of webviewer"; "content").  then set field ur text field with $return.  this will give u a return in fm text which is usable for whatever.  sometimes u need to include a timer to allow enough space for the server call.  if ur calc'd url isnt lighting up the webbiewer, u may need to Evaluate ($url) instead of just $url.

             

            this is go friendly.  ive bee using it for 2years and had great results.  hope it works for u.

            best, steve

            • 3. Re: Help with sending HTTP request
              MikeMcErlean

              Hi Stefan,

               

              You can do this without a web viewer or an iPhone app.

               

              I send SMS notifications to cell phones using FileMaker's send email

              script step.  This method isn't dependent on the type of phone your user

              has and doesn't require a plug in.

               

              Although I haven't verified the accuracy of the info here, it explains

              how to set it up - and gives the carrier addresses.

               

              http://www.makeuseof.com/tag/email-to-sms/

               

              Hope that helps.

               

              Mike

              • 4. Re: Help with sending HTTP request
                stefansmith2008@me.com

                Thanks for time you have taken to reply Steve - I will give this one a go and see how it works out.  From your description it looks ideal...

                • 5. Re: Help with sending HTTP request
                  stefansmith2008@me.com

                  Thanks Mike

                   

                  In the solution I have we have a paid for gateway for this, but the problem we have seen is reliability!  For whatever reason email sometimes gets rejected by the servers, even on a paid authenticated service.....not to mention SMTP servers sometimes delay things.  Its because of the errors we have seen that I am looking for an alternative.  Thanks for the tip though.