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.

Create and upload static HTML from an existing PHP page

Featured Replies

I assume this has already been asked but I can't find anything and I've been working in a cave for 2-1/2 years so I'm way behind on using the web viewer.

Googles new speed requirements are creating a big problem for me because of the speed of FMS and the required physical distance between my web servers and the database server (Linux web servers in New Zealand, Canada, South America, etc. with the Windows database server in Calif.)

I have some existing 'full featured' websites that have a few dozen pages that use the FM PHP API but are fairly static. I'd like to leverage what I already have then create static pages via FMS or a robot then send them to the web server.

Can anyone give me some detailed suggestions on how to do this? Such as use abc plugin on the server to get the page, do xyz using the web viewer then abc plugin to send the new page back to the server. I'm just using this example as a guess but would like to know how others would deal with this.

Thanks much.

The web viewer is browser and has nothing to do with creating web pages.

To turn your data into static web pages, export as XML using a custom XSLT stylesheet to transform the output to HTML. You can find a few examples of this in the Examples folder installed with FMP.

  • Author

I appreciate the idea but was hoping for something along the lines of going to a page, scraping the contents then somehow getting it back as static data. Or maybe putting the entire page in a single field/record.

The key is to find a way to leverage the work I already have. I have about 25 tables to work with (probably about 1000 fields) so I'm hoping that there's something faster than building style sheets.

going to a page, scraping the contents then somehow getting it back as static data.

You can do this in any browser: go to a page and save it as HTML. How useful the result is depends on how the page is constructed.

Edited by Guest

  • Author

Hmmm... I thought I came back this yesterday but I guess I left after just previewing.

I'm hoping for something automated. Not having used them yet, I'm pretty sure there are some plug-ins that will interact with the web viewer to get what FM's API has put out to the page. Mostly I'm doing my best to be lazy and hope to find someone who's already worked through it and can recommend a particular plug-in and process.

I wasn't sure if this was the best forum to post the question in but I'm feeling that the web viewer is the only thing that various methods have in common if I'm going to automate it.

You can automate this (or at least the main part of it) without any plugins, just by scripting:

1. Point your web viewer to the desired URL;

2. Loop or pause until the page has loaded;

3. Set a field to the page source using the GetLayoutObjectAttribute() function;

4. Export.

You WILL need a plugin or a third-party application to upload the result to your web site.

Note:

I haven't tried this with a page served by FMS, and I don't know how well this will work. If there are any linked documents (CSS stylesheets, Javascripts, etc.), these links may well break. And of course, anything on that page that requests data from the server will not work either.

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.