p
k^$cfg["return-output"]$ controls whether k^HObfus_end()$ should output obfuscated code to the browser or return it as a PHP string.

p
If k^$cfg["return-output"]$ is b^0$, k^HObfus_end()$ will output obfuscated code to the browser.

code
$cfg["return-output"]=0;
/code

p
If k^$cfg["return-output"]$ is b^1$, k^HObfus_end()$ will return obfuscated code as a PHP string.

code
$cfg["return-output"]=1;
/code

p
For example, the following code will assign the obfuscated code to a PHP variable named '$my_code':

code
$my_code=HObfus_end();
/code

p
It is up to you how you utilize the value of the variable. You may want to save it to a file and use it at a later time.

p
It is very rare that you want to set k^$cfg["return-output"]$ to 1 in the configuration file. Instead, you would rather want to override it in k^HObfus_begin()$ like:

code
HObfus_begin(array(
  "return-output"=>1
));
/code

p
The default value of k^$cfg["return-output"]$ is b^0$ (disabled).

code
$cfg["return-output"]=0;
/code

t
Example

p
The following PHP source code demonstrates the use of k^return-output$. It captures obfuscated JavaScript code and saves it to a file.

code
&lt;?php

// Set up the path to HObfus.inc.php
$path_to_HObfus="";

if(empty($path_to_HObfus)){
	die("Please set up the path to HObfus.inc.php!");
}

// Load HObfus.inc.php
require_once($path_to_HObfus);

// Set "return-output" to 1 in HObfus_begin()
HObfus_begin(array("return-output"=&gt;1));

?&gt;

&lt;!doctype html&gt;
&lt;html&gt;
	&lt;head&gt;
		&lt;meta charset="utf-8"&gt;
		&lt;title&gt;Example HTML&lt;/title&gt;
	&lt;/head&gt;
	&lt;body&gt;
		&lt;h1&gt;This is a test HTML page!&lt;/h1&gt;
	&lt;/body&gt;
&lt;/html&gt;

&lt;?php

// Capture obfuscated JavaScript code in a PHP variable named $my_code
$my_code=HObfus_end();

// Save the code to a file named "my_code.html"
file_put_contents("my_code.html",$my_code);

?&gt;
Done!

/code

p
At a later time, you may want to output the code to the browser. For example,

code
&lt;?php

// Load the code from a file named "my_code.html"
$my_code=file_get_contents("my_code.html");

// Output the code to the browser
echo $my_code;

?&gt;
/code

tpl
std
