The thought of static page processing dynamic content in PHP

Source: Internet
Author: User

Nearly encountered a problem, the news system all news is generated static, but I want to display the number of visits in the static page dynamic content, and pondered, there is no good solution. Today suddenly think, is it possible to solve through the frame page?

Summary of the basic ideas are as follows:
First open a static page similar to 20050120.html, which shows the news and other content, but also contains the number of visits, such as the following:

Source: Unknown release time: 2005-01-20 Hits: 21

So I'm going to include the above in a PHP program and then call this page with an IFRAME in the static page.
But now that we have a new problem, how can I submit the address of this static page and the corresponding variables to this frame page for processing?
Asked the master, using JS to deal with:
For example, Frame page ID is iframe, in large page iframe "). Form1.hidid= ' 20050120 '
Then how do I get this hidid= ' 20050120 ', also need to use JS, my idea is to use JS to get this page URL method, and then through regular expression to extract, such as my static page name is 20050120.html, Then I will extract 20050120, and then pass this value to Hidid, then the value passed to the frames page, the corresponding PHP program can be processed, and print the corresponding results.

I am not specific to achieve this way, but the basic ideas have.

There must be other methods, such as XMLHTTP, only the current knowledge is limited, can not be achieved, if there is a better solution to the master, please do not hesitate to inform!



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.