Jump to content

Is this acceptable? Discussion.


Michdd

Recommended Posts

I've been working on a small project recently. It's supposed to be a live-chat type thing with other features. One of the main features is the fact that you're able to upload images from a URL or directly from your computer. The images are directly put into the chat (thumbnails are of course generated..). I've been using PHP/Ajax to create this. The thing that I'm most concerned about is the method of updating that I currently use. So far it has been working fine, but I'm just curious if this method is actually 'acceptable'. In Javascript I have a function that repeats quite often and sends requests to a file 'update.php', to check if the user needs to be updated there's a field in the user database that contains the # of messages in the database during the time of the users last update. If the number of messages in the databases doesn't correspond with the value in the user's field (If a post was deleted or added) All the information is then collected and sent back to be replaced in the <div>. If the user doesn't require an update then nothing happens. To keep the post as up-to-date as possible. This function is called a couple times a second. Could this cause issues?

Link to comment
https://forums.phpfreaks.com/topic/159433-is-this-acceptable-discussion/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.