Login   Register  
PHP Classes
elePHPant
Icontem

File: test_vcard.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andreas Haberstroh  >  IMC Objects  >  test_vcard.php  >  Download  
File: test_vcard.php
Role: Example script
Content type: text/plain
Description: Test application
Class: IMC Objects
Read and write iCalendar and vCard files
Author: By
Last change:
Date: 10 years ago
Size: 1,148 bytes
 

Contents

Class file image Download
<?

require_once('class.imcVCard.php');

// Stand alone vCard object.
$vcard = new imc_vCard();
$vcard->setNameSuffix('Mr.');
$vcard->setGivenName('Andreas');
$vcard->setFamilyName('Haberstroh');
$vcard->setFN('Andreas Haberstroh');
$vcard->setPostOfficeAddress('', array('DOM','HOME') );
$vcard->setExtendedAddress('', array('DOM','HOME') );
$vcard->setStreetAddress('341 N. Bitterbush St.', array('DOM','HOME') );
$vcard->setLocality('Orange', array('DOM','HOME') );
$vcard->setRegion('CA', array('DOM','HOME') );
$vcard->setPostalCode('92868', array('DOM','HOME') );
$vcard->setCountry('USA', array('DOM','HOME') );
$vcard->setTelephone('714-532-9493'true, array('HOME') );

$fh fopen('test_vcard.vcf''w');

$imcComponent = new imcComponent;
$imcComponent->writeFile($fh);
fclose($fh);



print(
"<h1>vCard Object Usage</h1>");
print(
"<pre>");
print_r$vcard );
print(
"</pre>");

$fh fopen('sample.vcf''r');

$imcComponent = new imcComponent;
$imcComponent->readFile($fh);
fclose($fh);
print(
"<h1>vCard Component Usage</h1>");
print(
"<pre>");
print_r$imcComponent );
print(
"</pre>");



?>