How would I possible use or create a runtime environment in php that will communicate constantly with the backend of HTML XML and JS XML? Basicly, how would I make a php script not die but continually running and respond to the HTML XML events requesting the php script, example <form method="post">
is html and is using XML to send the script serverside (to php or other languages) then it refreshes to get a return statement. Normally php would die within' less then a second, but how would I make a runtime which will continually gonna stay open?
Note: Using a runtime is not the same as loading the script in with the javascript interval function!
Using the javascript interval and JQuery/AJAX to simply call the php script makes no different and would not be considered as a correct answer OR be correct at all, cause the interval function and the JQuery
load
function is calling the file each requestedms
, so using those functions would not solve the php runtime mysterium!
This will also mean if there is a way for php to run at a html runtime and create the php runtime to work together (multitasking) then php could be a whole new type of php.. I know that didn't make any sense, but it means you can extend php so much to literally create a timer event to extend multitasking from the php side (class timer {public function start(){ ... } public function stop(){ ... } public function interval($interval /* As Integer */){ ... } public function ON_TICK /* The event running the multitasking from php side */(){ timer::event('on_tick'); } private function event($event){ if($event==='on_tick'){ timer::executeEvent()}}; private function executeEvent($script){/*Script can include if statements and db upload, and conditions, etc*/ /* This will run the script that was called from the function, example $timer1 = new timer;$timer1->interval(1/*In ms*/);$timer1->script("if(1=1){$timer1->stop();}") */}}
)