#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 1999
    Posts
    37
    Rep Power
    26
    Hi,

    I have a PHP script running in CGI mode as a daemon. I'm writing another (non-daemon) PHP script that needs to be able to pass data to the daemon. How does one achieve this? Do I somehow set up the daemon to "listen" at a certain port or something? I definitely want to avoid writing to disk -- I need this to be fast; that's why I'm trying to do it all in-memory. Any info would be greatly appreciated.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    London/UK
    Posts
    91
    Rep Power
    15
    take a look @ exec() etc...

    Bealers

    ------------------
    http://back-end.org
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 1999
    Posts
    37
    Rep Power
    26
    Thanks, but I don't want to start a new process. I'm trying to pass data to a script that is always running.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 1999
    Posts
    37
    Rep Power
    26
    ... or did you mean that I should somehow use exec() to listen at the port?

    What did you mean?

    Wouldn't I just use fsockopen() and fgetc() or something like that? I've tried it and I can't get it to work.

    I'll think good thoughts about anyone who can help me.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    London/UK
    Posts
    91
    Rep Power
    15
    Sorry I don't know about sending data via a port. Something that *may* be useful is wddx, but that assumes that the daemon can parse the wddx packet, which is unlikely

    you might want to post this question to a *nix group

    Bealers

    ------------------
    http://back-end.org

Similar Threads

  1. Replies: 0
    Last Post: January 27th, 2004, 12:42 PM
  2. my comp sux lately , need help from pro's
    By Hykinsel007 in forum Windows Help
    Replies: 2
    Last Post: January 5th, 2004, 01:52 PM
  3. Passing data throught 2 php files
    By Manso in forum MySQL Help
    Replies: 1
    Last Post: December 20th, 2003, 07:42 AM
  4. Passing array data
    By pgudge in forum PHP Development
    Replies: 6
    Last Post: December 16th, 2003, 04:52 AM
  5. passing iframe data
    By jbatty in forum HTML Programming
    Replies: 0
    Last Post: December 6th, 2003, 06:19 AM

IMN logo majestic logo threadwatch logo seochat tools logo