[FX.php List] Re: [OffTopic] Executing php script from FileMaker,
how to get result back in to FileMaker GUI?
Dale Bengston
dbengston at tds.net
Wed Oct 15 15:21:59 MDT 2008
It's called SmartPill.
http://www.scodigo.com/
Dale
On Oct 15, 2008, at 4:05 PM, Ernest Cunningham wrote:
> There is a php plugin you can use to execute php within FileMaker.
> Just google search it.
>
> Ernest
>
> Sent from my iPhone
>
> On 16/10/2008, at 4:30 AM, "Gjermund Gusland Thorsen" <ggt667 at gmail.com
> > wrote:
>
>> Yeah, I wrote a disc cataloguing feature using do shell script for
>> fileMaker 6 or 7...
>>
>> I am not too fond of AppleScript, but I have also made an upload
>> field
>> content using curl, that might be nice for you to see.
>>
>> echo -en "whatever yo want he file to contain" | curl -T - -u
>> ftpusername:ftppassword
>> ftp://RemoteIPOrDomain/desiredRemotePath/desiredRemoteFilename.txt
>>
>> ggt
>>
>> 2008/10/15 DC <dan.fx at dbmscan.com>:
>>> i use applescript to do a similar thing (requires mac OSX, but no
>>> need
>>> for webviewer):
>>>
>>> put this in a "run applescript" script step:
>>>
>>> set cell "yourfieldnamehere" to do shell script "curl -s
>>> 'http://domain.com/php_script_that_outputs_something.php'"
>>>
>>> works very well to do all kinds of things, not just curl, but the
>>> whole
>>> box of UNIX commands is opened to Filemaker. i think of OSX now
>>> like a
>>> super-plugin!
>>>
>>> for instance, want to get a list of files in your home directory? no
>>> need for a plugin:
>>>
>>> set cell "list_of_files" to do shell script "ls ~"
>>>
>>> want to FTP something from your home directory?
>>>
>>> do shell script "curl --upload-file ~/file_4_xfr.tsv ftp://domain.com/
>>> "
>>>
>>> want to zip up all of your home directory's files?
>>>
>>> do shell script "cd ~; zip my_home_files *"
>>>
>>> enjoy your new plugin free life!
>>>
>>> dan
>>>
>>> Gjermund Gusland Thorsen wrote:
>>>>
>>>> Well using it in a set field makes it put the output from webserver
>>>> inside a field correctly...
>>>>
>>>> here is the script I use for making the Filemaker admin set the
>>>> webuser's password.
>>>> ---
>>>> <?php
>>>> include_once($_SERVER['DOCUMENT_ROOT'] . "/FX/FX.php");
>>>> include_once($_SERVER['DOCUMENT_ROOT'] . "/FX/server_data_kf.php");
>>>>
>>>> $q = new FX( $serverIP, $webCompanionPort, $dataSourceType);
>>>> $q->SetDBData( 'DBName', 'User' );
>>>> $q->SetDBUserPass( $webUN, $webPW );
>>>> $q->AddDBParam( '-recid', $_GET['id'] );
>>>> $r = $q->FMFind();
>>>>
>>>> $q = new FX( $serverIP, $webCompanionPort, $dataSourceType);
>>>> $q->SetDBData( 'DBName', 'User' );
>>>> $q->SetDBUserPass( $webUN, $webPW );
>>>> $q->AddDBParam( '-recid', $_GET['id'] );
>>>> $q->AddDBParam( 'userValid', sha1(
>>>> $r['data'][key($r['data'])]['userName'][0] . '/' . $projectKey .
>>>> '/' .
>>>> $r['data'][key($r['data'])]['userPassword'][0] ) );
>>>> $r2 = $q->FMEdit();
>>>>
>>>> if( intval( $r['errorCode'] ) == 0 && intval( $r2['errorCode'] )
>>>> == 0 ) {
>>>> echo 'OK';
>>>> } else {
>>>> echo 'Failed';
>>>> }
>>>> ?>
>>>> ---
>>>> ggt
>>>>
>>>> 2008/10/15 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
>>>>>
>>>>> I tried this: GetLayoutObjectAttribute ( "PassordViaWeb";
>>>>> "content" )
>>>>> only response is: ?
>>>>>
>>>>> ggt
>>>>>
>>>>> 2008/10/15 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
>>>>>>
>>>>>> I must admint that I have seen this and that it looks quiet
>>>>>> promising.
>>>>>>
>>>>>> http://lists.apple.com/archives/applescript-users/2006/Jul/msg00396.html
>>>>>>
>>>>>> ggt
>>>>>>
>>>>>> 2008/10/15 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
>>>>>>>
>>>>>>> Here is the tail -n 6 of my php script:
>>>>>>>
>>>>>>> if( intval( $r['errorCode'] ) == 0 &&
>>>>>>> intval( $r2['errorCode'] ) == 0 )
>>>>>>> {
>>>>>>> echo 'OK';
>>>>>>> } else {
>>>>>>> echo 'Failed';
>>>>>>> }
>>>>>>> ?>
>>>>>>>
>>>>>>> So when I put the URI with the current RecorID into the
>>>>>>> WebViewer, I
>>>>>>> see OK or Failed,
>>>>>>> but how do I scoop those up? I would expect the to be a Get()
>>>>>>> function
>>>>>>> for this?
>>>>>>>
>>>>>>> ggt667
>>>>>>>
>>>> _______________________________________________
>>>> FX.php_List mailing list
>>>> FX.php_List at mail.iviking.org
>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>
>>>
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list