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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:40:03+00:00 2026-05-27T10:40:03+00:00

how data is generated without user activity has never been quite clear to me.

  • 0

how data is generated without user activity has never been quite clear to me. Let’s say I’m running a lottery and people can check the winning ticket number online. This random number has to be automatically generated at a specific time and should be the same for every visitor. How is that done?

I figured I could use a PHP script which retrieves the previous number and check whether it is, say, over 7 days old. If it is, the script would then generate a new number and store it, so it will be retrieved when other users visit the page, in which case the number would simply be shown as it’s not over 7 days old.

This method of doing things might cause trouble with multiple users both trying to access files at the same time or overwriting data which is simultaneously generated by/for another visitor. I think it would be better if the number could be generated and stored independently of user activity, so the PHP script’s only task is to read it.

Any ideas would be much appreciated!

P.S: I’m using simple webhosting and do not physically have access to the server, can’t leave a .bat or .exe running I guess. Also, tags might be somewhat inaccurate as I don’t know what I should be using to tackle this problem.

  • 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-27T10:40:04+00:00Added an answer on May 27, 2026 at 10:40 am

    Use some kind of scheduler to execute the task at a given time. One such scheduler is called cron and is installed in most Unix-like environments.

    There are also cloud-based schedulers, which will call an URL of yours at the schedule you choose.

    If your hosting provider doesn’t provide this service (most do!), try searching for online cronjob, hosted cron or similar (a “cronjob” is one job executed by the cron daemon).

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

Sidebar

Related Questions

I'm starting to work with oop to build a site of user generated data.
I have some data generated in MATLAB that I want to process using Perl.
Some web applications, like Google Docs, store data generated by the users. Data that
I am developing a Java based desktop application. There are some data generated from
I'd like to use ftplib to upload program-generated data as lists. The nearest method
I use RedGate SQL data compare and generated a .sql file, so I could
I'm trying to use XSL-stylesheets in order to transform some generated XML-data to HTML-output.
We use queries generated by Linq for data retrieval but for INSERT and UPDATE
I have a PHP-generated page which is displaying some data about a set of
Divs of class=message are generated using a post which pulls data and puts it

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.