PHP Classes

PHP Dog Age Calculator: Convert the age of a dog a person equivalent

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 76 All time: 10,170 This week: 206Up
Version License PHP version Categories
ab_ 1.0Freeware5PHP 5, Time and Date, Biology
Description 

Author

This class can convert the age of a dog a person equivalent.

It can take the number of years of age of a dog and converts it to the equivalent in years of age of a human.

The class returns an array that has the number of dog years of age and a text message with a cumpliment or a recommendation to take care of your dog.

In Spanish:

Convierte la edad de un perro a edad humana. Esta simple clase convierte la edad de un perro a edad humana segun el promedio de vida de ambos y ademas retorna un mensaje según la edad calculada.

Picture of Dannel
  Performance   Level  
Name: Dannel <contact>
Classes: 9 packages by
Country: Cuba Cuba
Age: 31
All time rank: 30508 in Cuba Cuba
Week rank: 187 Up1 in Cuba Cuba Up
Innovation award
Innovation award
Nominee: 5x

Example

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>My Dog | Human Age</title>
</head>

<body>

<?php
require("dogage.php");
if(isset(
$_POST['age'])){
$obj=new dogHumanAge;

$age=$obj->dogAge($_POST['age']);
echo
'Your Dog is <b><font color="#FF0000">'.$age['humanizedAge'].'</font></b> years old in human age.<br />';
echo
$age['message'];
}else{
?>
<form method="POST">
Please input your dog&apos;s age:<br />
<input type="number" name="age" />
<input type="submit" value="OK"/>
</form>


<?php } ?>
</body>

</html>


  Files folder image Files (2)  
File Role Description
Plain text file dogage.php Class Class
Accessible without login Plain text file example.php Example Example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:76
This week:0
All time:10,170
This week:206Up