time out in php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carobee
    New Member
    • Jun 2007
    • 14

    #1

    time out in php

    hi everyone

    i m trying to write a script where i m communicating between C program and a php program through message queue. i want to add a time out feature in both sides, so that when the php script is looking for message it should not stay blocked ,rather wait for sometime and if there is no message available then come back.

    can anyone help please? im in urgent need..
  • kovik
    Recognized Expert Top Contributor
    • Jun 2007
    • 1044

    #2
    Originally posted by carobee
    hi everyone

    i m trying to write a script where i m communicating between C program and a php program through message queue. i want to add a time out feature in both sides, so that when the php script is looking for message it should not stay blocked ,rather wait for sometime and if there is no message available then come back.

    can anyone help please? im in urgent need..
    If it's a script that is being run by the client, it wouldn't make a difference. You want it to run in the background without the client's browser being on that particular page?

    Comment

    • dafodil
      Contributor
      • Jul 2007
      • 389

      #3
      Originally posted by carobee
      hi everyone

      i m trying to write a script where i m communicating between C program and a php program through message queue. i want to add a time out feature in both sides, so that when the php script is looking for message it should not stay blocked ,rather wait for sometime and if there is no message available then come back.

      can anyone help please? im in urgent need..

      Please explain further.....

      Comment

      • carobee
        New Member
        • Jun 2007
        • 14

        #4
        if the php script finds no message in the message queue ,then it should stop and show a time out error( i.e i guess i have to stop the php script).it is the scipt runnin in client side

        Comment

        • kovik
          Recognized Expert Top Contributor
          • Jun 2007
          • 1044

          #5
          PHP shows a time out error or the browser does?

          Comment

          • carobee
            New Member
            • Jun 2007
            • 14

            #6
            let me elaborate a bit

            i have to collect the message in php on the other side. what i designed follows like this
            1)sent the message from php script to C prog
            2)if C prog receives , then sends a ack to php script
            3)php script receives the ack from php.meanwhile C prog monitors the message queue for in coming messages. if there is no message the for atleast say some sec, then sends a nack
            4)the php script on receiving the nack should time out.

            i have finished all the steps, but i start again from step one without ending the C program, then the php script goes on halt. the C program is using threads

            Comment

            • carobee
              New Member
              • Jun 2007
              • 14

              #7
              i think i have solved it :)

              thanks anyway

              Comment

              Working...