Find programmers and graphic design experts at ScriptLance.com

Home    API

Want to use the NFO stripping engine from this site on your own? I have built a PHP library that can be used pretty much anywhere for any item. PHP version requires cURL library to be enabled. Download Links for each language and a code sample is below.

Download PHP Version (PHP Versions 4 & 5)


This is a simple PHP Library that uses cURL to strip the NFO against the engine on this site.

<?php
// Include Library
require 'NFOStripper.lib.php';

// Get Contents of an NFO File
$data = file_get_contents('file.nfo');

// Create new NFO Object with the NFO data as the first argument
$nfo = new NFOStripper($data);

// Set Image Conversion
// 0 = No Image Generation, 1 = Generated Image without stripping, 2 = Generated Image with stripping
$nfo->ImgOpt(0);

// Set Code Formatting
// 0 = No Formatting, 1 = BBCode Formatting, 2 = HTML Formatting
$nfo->FormatOpt(0);

// Strip the NFO and get the results
$result = $nfo->Strip();

// Echo Results
echo $result;

?>

Download Perl/CGI Version


Perl module that can be used for stripping NFO Files. Requires LWP module.

#!/usr/bin/perl

# Include the NFOStripper.pm file
use NFOStripper;

# Get the NFO contents
local $/=undef;
open(NFO, 'test.nfo') || die("Could not open file!");
$filesize = -s 'test.nfo';
read(NFO, $rawdata, $filesize);
close NFO;

# Create the New NFOStripper Object
my $nfo = eval { new NFOStripper($rawdata); } or die ($@);

# Set Image Conversion
# 0 = No Image Generation, 1 = Generated Image without stripping, 2 = Generated Image with stripping
$nfo->ImgOpt(0);

# Set Code Formatting
# 0 = No Formatting, 1 = BBCode Formatting, 2 = HTML Formatting
$nfo->FormatOpt(0);

# Strip the NFO and get the results
$result = $nfo->Strip();

# print Results
print($result);

Yes, an API! - Added 01/26/2010 22:04:07 CST (-0600)
- For everyone who has wanted to embed this into their own website, you can now. The API is
  available for PHP. It seems to have no problems. I've also obfuscated it, don't bother trying
  to reverse it, all it does is create an off-site request.

del.icio.us del.icio.us - Bookmark this
stumbleupon Sumble Upon - Bookmark this

Valid XHTML 1.0 Strict  Valid CSS!