Okay, I'm having trouble figuring out how I'm going to do this...
I Script1 is in a while() loop basically keeping the connection alive to an IRC server opened via fsockopen().
I have Script2 that will be called only for sending a command through. This means using the same resource as Script1.
I was in ##php on the FreeNode IRC server (like I always am) but they didn't help me much... Any ideas guys?
Right now I have it doing a sort of "job list" system.
I post each command I want it to send on a separate line and every time the script gets a ping, pong, or someone says something/does something then it retrieves the list of jobs and executes them. This REALLY isn't work and I've tried extremely hard to see if I can get it to execute regardless of something going on, on the server. This is close to impossible but its so far my best solution. Reason this isn't work is because every time it receives an action from the server it goes through the while and then waits for another action. It doesn't continually run through it. This is because its using fgets() to retrieve each packet.
One of the people in ##php suggested I do something like a checkPost() to continually check if it received post-data only to be bashed by me due to the fact that an already running script has already received its headers and is executing the rest of the code... *sigh*... Why am I even in that channel? ...
My main question is this: Is it possible for two separate scripts to share a resource so that one script can send a command and another may listen? (with out storing it in $_SESSION, because it can be worse then what I already have... =/ )
Or is there another method that will work the same way? (easy or hard, I just need a method that gets the job done quick).
I should be able to write out the code if you guys just supply me with ideas.
I Script1 is in a while() loop basically keeping the connection alive to an IRC server opened via fsockopen().
I have Script2 that will be called only for sending a command through. This means using the same resource as Script1.
I was in ##php on the FreeNode IRC server (like I always am) but they didn't help me much... Any ideas guys?
Right now I have it doing a sort of "job list" system.
I post each command I want it to send on a separate line and every time the script gets a ping, pong, or someone says something/does something then it retrieves the list of jobs and executes them. This REALLY isn't work and I've tried extremely hard to see if I can get it to execute regardless of something going on, on the server. This is close to impossible but its so far my best solution. Reason this isn't work is because every time it receives an action from the server it goes through the while and then waits for another action. It doesn't continually run through it. This is because its using fgets() to retrieve each packet.
One of the people in ##php suggested I do something like a checkPost() to continually check if it received post-data only to be bashed by me due to the fact that an already running script has already received its headers and is executing the rest of the code... *sigh*... Why am I even in that channel? ...
My main question is this: Is it possible for two separate scripts to share a resource so that one script can send a command and another may listen? (with out storing it in $_SESSION, because it can be worse then what I already have... =/ )
Or is there another method that will work the same way? (easy or hard, I just need a method that gets the job done quick).
I should be able to write out the code if you guys just supply me with ideas.