PHP Classes

File: ascii2image.example.php

Recommend this page to a friend!
  Classes of Stanga Razvan   ASCII 2 Image   ascii2image.example.php   Download  
File: ascii2image.example.php
Role: Example script
Content type: text/plain
Description: example
Class: ASCII 2 Image
Render .nfo text files as graphical images
Author: By
Last change:
Date: 19 years ago
Size: 829 bytes
 

Contents

Class file image Download
<?

//=============================//
// //
// ascii2image example //
// ascii2image.example.php //
// by Razvan Stanga //
// razvan_stanga@yahoo.com //
// http://www.phprebel.org //
// //
// MADE IN ROMANIA //
// //
//=============================//

require ("ascii2image.class.php");

$ascii2image = new ascii2image ();

$ascii2image->loadNFO ("quantum");
$ascii2image->loadFont ("terminal");

// if this is true, it will create a file named quantum.png in png directory
$ascii2image->file = FALSE;

if (
$ascii2image->file == FALSE ) {
   
Header( "Content-type: image/png");
} else {
    echo
"<img src=\"png/".$ascii2image->id.".png\">";
}

$ascii2image->doImage ();

?>