PHP Classes

File: SERVER/HttpLongPoll.php

Recommend this page to a friend!
  Classes of Ettore Moretti   Xaja Notifier   SERVER/HttpLongPoll.php   Download  
File: SERVER/HttpLongPoll.php
Role: Example script
Content type: text/plain
Description: Class source
Class: Xaja Notifier
Notify user browsing a site in real time with AJAX
Author: By
Last change: Update HttpLongPoll.php
Date: 8 years ago
Size: 503 bytes
 

Contents

Class file image Download
<?php
/**
 * Here intercept the ajax call for the client
 *
 *
 * PHP version 5
 *
 * @author Ettore Moretti <ettoremoretti27@gmail.com>
 * @version 1.0.0
 *
 */
set_time_limit(0);

require_once
'core/XajaServer.php';

// Retrieving the last timestamp
$lastTimestamp=isset( $_GET['timestamp'])? $_GET['timestamp']: 0 ;

// Retrieving the uid
$uid=isset( $_GET['id'])? $_GET['id']: 0 ;

//XajaServerClass instance and polling start
$XS= new XajaServer($lastTimestamp,$uid);
   
$XS->StartLongPoll();