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

Create and upload static HTML from an existing PHP page


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

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted (edited)

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
Posted

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.

Posted

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.

This topic is 5433 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.