PHP Classes
elePHPant
Icontem

File: subscriber.php

Recommend this page to a friend!
  Classes of Jorge Castro  >  UsagiMQ  >  subscriber.php  >  Download  
File: subscriber.php
Role: Example script
Content type: text/plain
Description: Example script
Class: UsagiMQ
Manage message queues stored using Redis
Author: By
Last change:
Date: 2 years ago
Size: 395 bytes
 

 

Contents

Class file image Download
<?php
// its a local subscriber
include "UsagiMQ.php";

$usa=new UsagiMQ("127.0.0.1",6379,1);
if (!
$usa->connected) {
    echo
"not connected";
    die(
1);
}

$listEnveloper=$usa->listPending("insert");

foreach(
$listEnveloper as $id) {
   
$env=$usa->readItem($id);
   
var_dump($env);
   
// here we process the envelope
    // and if its right then we could delete.
    //$usa->delete($id);
}