Login   Register  
PHP Classes

File: phpJSO.example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Noor Dawod  >  Javascript Obfuscator  >  phpJSO.example.php  >  Download  
File: phpJSO.example.php
Role: Example script
Content type: text/plain
Description: An example PHP script
Class: Javascript Obfuscator
Obfuscate a Javascript source code
Author: By
Last change:
Date: 10 years ago
Size: 1,879 bytes


Class file image Download

   *  phpJSO - A JavaScript Obfuscator written in PHP.
   *  Copyright © COMRAX® Ltd. All rights reserved.
   *  Unauthorized duplication and modification prohibited.

  /// Include phpJSO main class file.
require_once( 'phpJSO.class.php' );

/// Source file to be obfuscated.
ob_start( );
readfile'phpJSO.example.js' );
$javascriptCode ob_get_contents( );
ob_end_clean( );

/// Instantiate a new phpJSO object.
$jso = new phpJSO( );

/// Point to the source code using a referenced variable.
$jso->setSourceCodeByRef$javascriptCode );

/// Process source code and get back obfuscated code.
$obfuscatedCode =& $jso->getObfuscatedCode( );

/// Free memory.
$jso->freeMemory( );
$jso null;

/// Output obfuscated code.
echo $obfuscatedCode;