Jump to content

aarnott

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

aarnott's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I should have mentioned , based on the logic of what I want to do it will be like this: * Open a connection * Wait for some flag in the database to be set (sleep) * Once the flag is set, do some transactions with the database * Modify some session variables I actually somewhat glazed over that because I will be writing to the session after I am done waiting (ie. I am still using the session). Of course, that is dumb of me because I can always just reopen the session. Thanks for the sanity check .
  2. Does your page have a captcha to validate user input? If not, I suggest taking a look at recaptcha http://recaptcha.net/.
  3. I've been toying around with the concept of long polling (I'll explain below), but I'm starting to think that I may not be implementing it very well. Long polling is a method where the client browser opens up a request to the server, but the server intentionally doesn't return a response right away. Instead, it waits until whatever information the client wanted is ready and then sends that information back. Once the client gets the information, it can open another connection to the server to wait for more information. Basically, this is a method to allow the server to push information to the client, rather than require the client to continually poll the server for updates. The PHP sleep function seems to apply on a session basis (yes I have read the docs and it is quite clear on that point ). This poses problems with long polling because if I sleep script execution for 2 seconds, the user can't access other scripts during those 2 seconds. tldr; Is there any way I can call a sleep function and just apply it to a single script execution, not the entire session?
×
×
  • 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.