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 7637993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:04:05+00:00 2026-05-31T08:04:05+00:00

My php script parses user’s profile on other site, takes some info and generates

  • 0

My php script parses user’s profile on other site, takes some info and generates .png image with it for certain user (script.php?username=). Each time page with these images is loaded, script runs again and again.
How can I cache images and only run script again if information it outputs was changed? It would save pretty much resources.

  • 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-31T08:04:06+00:00Added an answer on May 31, 2026 at 8:04 am

    You will need to parse the user’s profile again on each request to find out if something has changed.

    You can then throw all the information into some kind of hash like md5($name.$location) and store this information anywhere. If you now get a request for an image, parse the user’s profile, create the hash again and look this hash up. If you have stored it, you previously created the image and can just output it. If the hash is different, the user’s information has changed, as well and you will have to recreate the image.

    You can also apply some heuristic like the fact that a user might only change his profile once an hour, or even only once a day. With this assumption you can compare the creation date of the user’s image and only parse the user’s information if the image is older than an hour (or day).

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

Sidebar

Related Questions

I am using a bespoke JQuery/PHP script which parses a Flickr feed using SimpliePie
My PHP script generates a table with rows which can optionaly be edited or
I've a php script that if the user ahs the privilege to download and
I'm having issues with loading the user's information into Flash from a PHP script.
I have a PHP search script that queries a MySQL database and then parses
On my website I have a PHP script which (when user enters a username
I need to write a script that takes a link and parses the HTML
Situation: A user submits a url and my php script adds that url to
I am running Apache on my localhost. From a PHP script run as www-user
My php script parse the user information from My MySQL data base and shows

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.