Announcement

Collapse
No announcement yet.

Parsing HTML into a page using PHP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Parsing HTML into a page using PHP

    I have written a php script that creates a HTML file from data in a MySql database and places the file in the acatalog folder. How do I get Actinic to parse this HTML file into an Actinic product page template. By hand this is done by opening the window - Product Details >> General tab >> and copying and pasting the text from the file into the Full Description text box. Not ideal.

    #2
    if i understand you correctly, I have done something similar to this,
    In actinic, i placed a line in the product like this:

    Code:
    <?php include("page.php"); ?>
    Then once the page is viewed on the website, it brings in whatever was in that page. Not sure it can bring in everything you might want. When i use it it brings in all relevant product details and stock details that are spread between 6 different websites.

    Hope this helps

    Dave.
    www.xcelcius.com
    Thermal Underwear thats gives protection down to -25c

    Comment


      #3
      Thanks for the reply.
      Yes, I have been using your method where page.php creates the HTML on the fly so to speak. It has been creating a list of products depending on the URL variable passed from a link. But I am looking to move away from using php 'live' to create HTML text, the reason for this is to improve hit ratings with web spider/crawler programs. My theory is to use the link to open an Actinic web page with the list of products already parsed into it that has been previously created by my script. Currently I can only get it there by copying and pasting by hand into Full Description.
      As there are 25 links with regular product updates maintenance is time consuming.

      Hope I am making sense.

      Is my web crawler theory correct or are all Actinic pages blind to spider programs?
      is there a solution within the Actinic environment or do I have to write directly to the Access database?
      Thanks

      Comment


        #4
        If you're on a *nix server, you could try a server side include to bring in your generated html page.

        If your ISP allows, you can set a .htaccess file to parse .html as .shtml so that you don't need to change yout .html extensions:

        Code:
        AddType text/x-server-parsed-html .html
        In your Act_ProductLine.html template add:

        Code:
        <!-- #include file="your-generated-code.html" -->
        where you want your list.

        There is a problem however with pages served by the cgi-bin eg the product search and login (in Business) - they won't be parsed. Don't know how much of an issue this would be for you.

        HTH
        Chris
        -----
        http://www.livingaidsonline.co.uk

        Comment

        Working...
        X