Login   Register  
PHP Classes
elePHPant
Icontem

File: utils.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Charalampos Pournaris  >  Torrent Pieces Hash Verification  >  utils.php  >  Download  
File: utils.php
Role: Auxiliary script
Content type: text/plain
Description: Utility functions
Class: Torrent Pieces Hash Verification
Compare downloaded data with torrent data
Author: By
Last change:
Date: 2009-01-12 15:53
Size: 438 bytes
 

Contents

Class file image Download
<?php 
/**
 * Utility function to print a message on stdout
 * 
 * optionaly can stop the program execution ($fatal variable)
 * 
 * @param string $message
 * @param boolean $fatal
 */
function printConsole($message$fatal false) {
    global 
$output_file$msgbuffer;
    
    if (!empty(
$output_file) && !$fatal) {
        
$msgbuffer .= $message."\n";
    } else {
        print ( 
$message "\n" );
    }
    
    if (
$fatal)
        exit ( 
);
}
?>