Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Arturs Sosins  >  Phone Spell  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example usage
Class: Phone Spell
Find words that can spell a phone number
Author: By
Last change:
Date: 2 years ago
Size: 1,172 bytes
 

Contents

Class file image Download
<?php
/************************************************************* 
 * This script is developed by Arturs Sosins aka ar2rsawseen, http://webcodingeasy.com 
 * Feel free to distribute and modify code, but keep reference to its creator 
 * 
 * Phone spell class can generate words that represent dialing for provided phone number.
 * It also calculates word weight in numbers to order found variations 
 * starting from most promising ones.
 * 
 * For more information, examples and online documentation visit:  
 * http://webcodingeasy.com/PHP-classes/Spell-your-phone-number
**************************************************************/
//it could take some time
set_time_limit(0);
//measure time
$time microtime();
$time explode(' '$time);
$start $time[1] + $time[0];

//declaring class instance
include("./phone_spell.php");
$ws = new phone_spell();
echo 
"<pre>";
//your phone number here
$arr $ws->get("8004659269");
print_r($arr);

//end time
$time microtime();
$time explode(' '$time);
$end $time[1] + $time[0];
$total_time round(($end $start), 4);
echo 
'<p>PHP execution: '.$total_time.' seconds.</p>';
?>