PHP Classes

File: examples/example2.php

Recommend this page to a friend!
  Classes of Thomas Björk   PHP Background Service Caller   examples/example2.php   Download  
File: examples/example2.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Background Service Caller
Call background services running on socket servers
Author: By
Last change: Update of examples/example2.php
Date: 5 months ago
Size: 419 bytes
 

Contents

Class file image Download
<?php
include_once('../bgcaller.php');
BackgroundServiceCaller::AssignIni('./example.ini');

$id = BackgroundServiceCaller::TCPAddQueue('coffee', file_get_contents('./example1.coffee'));

header('Content-Type: application/javascript');
while(
BackgroundServiceCaller::TCPCheckQueue($id) == 1) {
  echo
"Service is not ready yet. Going to sleep!!!!!!!!!!!!";
 
sleep(1);
}
echo
BackgroundServiceCaller::TCPGetQueue($id);