Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7594 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

If you use a middleware application like PHP, you can submit the request to a PHP script. The PHP script can forward the request to FileMaker and read the resulting XML stream into a variable.

Once the XML is stored in a variable, you can create an output page which would actually prompt the user to download and save the output as a file on their computer. Adding the following PHP code would configure the response to do this, and would send the XML contents as a downloadable file.


<?

   header( "Content-Type: application/unknown" ); 

   header( "Content-Disposition: attachment; filename=[color:"silver"]your_filename_tba.xml[/color]"); 

   print ( $your_xml_variable );

?> 

If you're not familiar with using PHP and FileMaker, take a look at the FX.php class available at www.iviking.org. This is a free bit of code that makes it easy to communicate with FileMaker from PHP.

Posted

BTW, just as a simple example, the following would prompt the user to download a file to their local file system:

<?

header( "Content-Type: application/unknown" );

header( "Content-Disposition: attachment; filename=test.txt");

print ( "This text will appear in the text file you download" );

?>

I've loaded a copy of this exact code to my PHP enabled website:

http://mariano.petersonpages.com/demo/php/downloader.php

This should give you an idea as to what the result is like.

This topic is 7594 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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