PHP Classes
elePHPant
Icontem

File: usage.php

Recommend this page to a friend!
  Classes of Rupom Razzaque  >  Grab Gmail Address Book  >  usage.php  >  Download  
File: usage.php
Role: Example script
Content type: text/plain
Description: Example Usage
Class: Grab Gmail Address Book
Grab the contact lists of a Gmail user
Author: By
Last change: To make the example easier to use.
Date: 9 years ago
Size: 1,099 bytes
 

Contents

Class file image Download
<?php
/**
* Grab Gmail : Gmail Addressbook Grabber Class
*
* @author : MA Razzaque Rupom <rupom_315@yahoo.com>, <rupom.bd@gmail.com>
* Moderator, phpResource (http://groups.yahoo.com/group/phpresource/)
* URL: http://www.rupom.info
                   http://rupom.wordpress.com
* @version : 1.1
* @date 05/25/2006
* Purpose : Grabbing Your Gmail Addressbook
*/

 
require_once("GrabGmail.class.php");
 
 
$login = 'yourgmailid';//without "@gmail.com"
 
$password = 'yourgmailpassword';
 
$cookiePath = '/path/to/cookie/dir';

 
$obj = new GrabGmail();
 
$obj->setLoginInfo($login, $password);
 
$obj->setCookiePath($cookiePath);
 
$obj->setProxy("proxy.proxydomain.com:port");
 
$obj->prepareContactList();
 
$obj->dBug("========== All Contacts of <b>$login@gmail.com</b> ==============");
 
$obj->dBug('---- Contacts in Table ------');
 
$resultTable = $obj->getResultTable();
 
$obj->dBug($resultTable);
 
$obj->dBug('---- Contacts in Array ------');
 
$resultArray = $obj->getResultArray();
 
$obj->dBug($resultArray);
?>