4 Replies Latest reply on Jun 13, 2017 8:39 PM by smower

    FM16 Insert From URL script on Password Protected Site - Login, Pass Cookie Question

    smower

      Hello FileMaker Experts,

       

      I am trying to retrieve a shipping charge from ABF website, but it requires me to login.  I can retrieve it with curl from the command line on my desktop computer but I can't seem to get it to work with the Insert From URL script step as it doesn't seem to retain the login info. For example using 2 command line curl steps on my desktop, logs me in and gets my document.

       

      curl.exe "https://www.abfs.com/tools/accountinfo/acctpswd.asp" --data "userid=myuserid&password=mypassword&hidSubmitted=Y&remote=Y" -c cookie -k

      curl.exe "https://www.abfs.com/tools/paidhistory/default.asp?Page=/tools/paidhistory/default.asp&inWin=Y&Pro=160242007" -b cookie -k

       

      however, I can't get this to work on FileMaker Insert from url script step.

       

      I tried assigning a $header variable with the Insert Text command like this:

       

      -request POST

      --data "userid=myuserid&password=mypassword&hidSubmitted=Y&remote=Y"

      -k

      -c cookie

       

      Then I do an Insert from URL script step assigning a $$result variable and

      url: "https://www.abfs.com/tools/accountinfo/acctpswd.asp"

      curl options: $header

       

      This seems to log me in just fine.

       

      I then try to get the url as follows.

       

      I tried assigning a $header2 variable with the Insert Text command like this:

       

      -request GET

      -k

      -b cookie

       

      Then I do an Insert from URL script step assigning a $$result2 variable and

      url: "https://www.abfs.com/tools/paidhistory/default.asp?Page=/tools/paidhistory/default.asp&inWin=Y&Pro=160242301"

      curl options: $header2

       

      but it basically returns an error saying I need to be logged in to do this.

       

      I tried changing the header cookie section to -b $$cookie and -b @$$cookie but I get the same error asking for login every time.

       

      Would anyone be willing to let me know what I need to fix to get it to work on FileMaker?

       

      Thank you in advance!

      Shawn