Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4596780
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:09:48+00:00 2026-05-21T23:09:48+00:00

I have only a couple thousand records in a MySQL db that can be

  • 0

I have only a couple thousand records in a MySQL db that can be called dynamically via php/url params (page.php?id=123). I also have a gnarly legacy function that pulls all the info for that page from the db, and generates a flat .html file based on a title field for each record. Every time a record is updated, this function is run and the page is regenerated.

It works well enough, but with a major rewrite around the corner and tons of intermingling html/php and hideous conditional logic in said function, I’d like to be able to update the php page (which works perfectly without the function), and then as records are updated in the backend, a simple command is called that hits page.php?id=updated_id and spits out an HTML page in the /pages directory, for example.

I was thinking about trying wget but before I go trying system stuff in PHP I thought I’d see if anyone has done anything similar?

The goal is, instead of updating this crazy function that writes html every time there is a design change, I can just edit the php file and change the post-update function to point to page-v1.php.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:09:49+00:00Added an answer on May 21, 2026 at 11:09 pm

    Do you really need to go the route of generating the HTML and then returning it. It’s a good solution for creating a v.fast site as there’s little work done for each user request.

    A more normal way of achieving something similar is to add some level of caching either to your application or by putting a reverse proxy (maybe varnish, lighttpd, squid) in front of the web server.

    edit: If it’s just a case of wanting to request a URL from within another page you can do this with file_get_contents() or any other PHP “file” commands if you have url wrappers enabled. If you want a nicer, more configurable HTTP client from within PHP take a look at cURL

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a couple of simple forms that send an html-only email. Most clients
I have a page complete with a php library, header, etc that I need
We have a chat program that works with only a couple of browsers right
I have only one class with many instances. Every instance is observer of couple
I have been writing Python code for only a couple of weeks, so I'm
I have an application with many views. I want only a couple of the
Let's say I have a large table (a couple of thousand rows) and I
I have only a couple of months experience on Objective-C. I have a code
I am only a few days in and have only made a couple things
Update So i have a textile with thousand of lines that looks like this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.