Login   Register  
PHP Classes

File: page2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Michael Rubinsky  >  IMSP Client Classes  >  page2.php  >  Download  
File: page2.php
Role: ???
Content type: text/plain
Description: Demonstration File
Class: IMSP Client Classes
Deprecated classes for dealing with IMSP servers.
Author: By
Last change:
Date: 12 years ago
Size: 1,364 bytes


Class file image Download
if (!$_SESSION["loggedin"]) {
	header("Location: http://www.yourdomain.com/imspClient/login.html");

//remember, for our example the addressbook name is the same as the username
$abookname = $_SESSION["username"];

<TABLE Border=1>
	//Recreate a new IMSPAddressBook object
	$imsp = new IMSPAddressBook();
	//Login again with the user/pass stored in the session variables
	//Note: This is a simple example and contains no error handling for failure.
	/* Recieve an associative array of the requested entry.
	 * Note that the name of the entry is passes in the query string so we get to it
	 * with $_REQUEST["entry"] since it is recommended to keep register_globals = Off
	$name = $imsp->getAddressBookEntry($abookname,$_REQUEST["entry"]);
	//Logout of the IMSP server...NOT the PHP session.
	//Build the table.
	while(list($key,$value) = each($name)) {

	//Kill the PHP session since we are done. Note that this would normally be provided as a "logout" button 
	//in out final application.