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 Matthew Johnston  >  PSN Trophy Data  >  Example.php  >  Download  
File: Example.php
Role: Example script
Content type: text/plain
Description: An example of use
Class: PSN Trophy Data
Retrieve PlayStation network trophy data
Author: By
Last change: Forgot to add a break
Date: 2009-12-22 17:50
Size: 492 bytes
 

Contents

Class file image Download
<?php
require_once('class.PSNCard.php');

$psnUsername 'xnowandtheworldx';
$psn = new PSNCard($psnUsername);
$percentLeft = (100 $psn->progress);
echo 
$psn->bronze,' Bronze Trophies<br/>';
echo 
$psn->silver,' Silver Trophies<br/>';
echo 
$psn->gold,' Gold Trophies<br/>';
echo 
$psn->platinum,' Platinum Trophies<br/>';
echo 
'Level: ',$psn->level,'<br/>';
echo 
'Only ',$percentLeft,'% left to your next level <br/>';
echo 
'You have a total of ',$psn->total_trophies,' trophies';