PHP Classes

File: Example.php

Recommend this page to a friend!
  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: 14 years ago
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';