PHP Classes

File: status.sample.php

Recommend this page to a friend!
  Classes of Joseluis Laso   jlaso My Session   status.sample.php   Download  
File: status.sample.php
Role: Example script
Content type: text/plain
Description: Example script
Class: jlaso My Session
Store and get additional session data in files
Author: By
Last change: Update of status.sample.php
Date: 3 months ago
Size: 600 bytes
 

Contents

Class file image Download
<?php
   
if (isset($_REQUEST['sid'])) session_id($_REQUEST['sid']);
   
session_start();
   
   
// MySession
   
require '../MySession/MySession.php';
   
$mysession = new MySession(session_id());
   
   
$id = isset($_REQUEST['id'])?$_REQUEST['id']:'';
   
  
   
// this sends to requester the percent of activiy and id,
    // normally the requester is a javascript routine and for not
    // use global id vars now this script returns id
   
print(json_encode(array(
                       
"p" => $mysession->readKey($id),
                       
"id" => $id,
         )));