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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:05:41+00:00 2026-05-28T22:05:41+00:00

NOTE: program in java, server uses php, and mysql…file is .log or .txt file

  • 0

NOTE: program in java, server uses php, and mysql…file is .log or .txt file

I have a program which takes the last line from a txt file and sends it via HTTP request to a server. The file is written by an external program, but the user is be able to open it an modify it.

The lines are in this format, and the time will be in the local computer time.
[hh:mm:ss] Message

If I consider that the time in the (real) message IS the time in the computer can I use it to verify the freshness and validity by comparing with a time in a fix location? (server time, gtm time, etc)

The users could be anywhere around the world, and I cannot guarantee that the time in the local machine is exact. My idea would be to start the program and check for time on machine, and compare it to my external time. then somehow manage to make sure that the message was not done by the user….for example message should have to be 20s~ computer time and time in computer should be synchronized with external time.

Never done something like this, but really interested.

(I know there will never be a hacker proof program, but would like to make it as hard as possible)

Thanks, I will add details in the afternoon if needed.

  • 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-28T22:05:42+00:00Added an answer on May 28, 2026 at 10:05 pm

    Two options for Time Issue:

    • If you can modify the program that creates the file, always use a fixed timezone to write the time. This will ensure the time is accurate across all timezones.

    • OR you can write the timezone along with the time and compute accordingly at server side.

    Regarding User Tampering the data:

    I suggest you generate a MD5 hash of the message and send it along. Then compute the MD5 from message contents again at server side. If the hash does not match the MD5 passed to server, it means the user has tampered the data.

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

Sidebar

Related Questions

(Note: This is for MySQL's SQL, not SQL Server.) I have a database column
I wrote a program with java and mysql and now i want to have
Ok, so I've got an Open Source Java client/server program that uses packets to
I have a spring batch program which reads from a file and writes to
I have a java program that uses ProcessBuilder to call the unix sort command.
I have written a java program that tests the speed of a couple of
Can a Java.exe JVM restart itself somehow? If you have a Java program running
I have some queries being run in a java program that makes use of
I have the MYSQL database in the local machine where I'm running the java
I'm using Java's SSLSocket to secure communications between a client and a server program.

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.