<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://test.amule.szerverem.hu/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://test.amule.szerverem.hu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=87.69.41.166</id>
		<title>AMule Project FAQ - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://test.amule.szerverem.hu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=87.69.41.166"/>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Special:Contributions/87.69.41.166"/>
		<updated>2026-04-05T16:49:00Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/AMuleWeb_PHP</id>
		<title>AMuleWeb PHP</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/AMuleWeb_PHP"/>
				<updated>2006-10-17T19:53:32Z</updated>
		
		<summary type="html">&lt;p&gt;87.69.41.166: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;aMuleWeb PHP manual&amp;lt;/h1&amp;gt; ''by  Froenchenko Leonid lfroen@gmail.com [[User:Lfroen|Lfroen]]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;This page is in unfinished state. Information may be missing, inaccurate, misspelled or all of them&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
[[aMuleWeb]] is an add-on program, used together with [[aMule]] and serves as webserver, allowing user to control aMule through browser interface. aMuleWeb works very similar to regular and wide-known webservers such as Apache[http://www.apache.org] - set of HTML pages stored on server side (called &amp;quot;template&amp;quot;). Those pages contains embedded server-side script, which is running when user requests the page. Resulting page is returned to user.&lt;br /&gt;
&lt;br /&gt;
The scripting language, [[aMuleWeb]] using is very similar to widely known &amp;quot;PHP&amp;quot;, developed and distributed by Zend company [http://www.zend.com]. Since aMuleWeb implementation is differ from original PHP, I will call it &amp;quot;aMuleWeb PHP&amp;quot; for reader convenience. &amp;quot;The PHP&amp;quot; language, will be referred as &amp;quot;real PHP&amp;quot; or just &amp;quot;PHP&amp;quot; to make difference between the two.&lt;br /&gt;
&lt;br /&gt;
=== Conventions ===&lt;br /&gt;
Language elements, reserved words are marked bold: '''keyword'''. Things that are not part of syntax, but are reserved or predefined marked bold italic: '''''special_var''. Languge limitations marked like:&lt;br /&gt;
*Making cofee not supported&lt;br /&gt;
&lt;br /&gt;
=== Interaction with PHP and webserver ===&lt;br /&gt;
Similarly to real PHP, script is embedded into regular HTML pages using &amp;lt;?php ?&amp;gt; marks. Page must have .php extension in order to be searched for script. Note, that markups can not be nested, i.e. placing &amp;lt;html&amp;gt; marks inside of &amp;lt;?php ?&amp;gt; will result in syntax error.&lt;br /&gt;
&lt;br /&gt;
=== Core language constructs ===&lt;br /&gt;
aMuleWeb PHP have same basic language elements as real PHP version 5. Several things supported or implemented differently:&lt;br /&gt;
OO constructs (classes) may pass syntax check, but they are not supported in any way.&lt;br /&gt;
'''include''' construct is parse-time directive (in contrary to PHP, where you can do it in run-time and check result of &amp;quot;include&amp;quot; operation)&lt;br /&gt;
There's no '''list''' at all.&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
There's scalar (referred as $var) and array (referred as @var) variables. Similarly to real PHP all variables are local, unless defined otherwise.&lt;br /&gt;
Variables, marked as '''global''' must be declated ''before'' this definition. Example:&lt;br /&gt;
&lt;br /&gt;
 $a = 1;&lt;br /&gt;
&lt;br /&gt;
 function foo()&lt;br /&gt;
 {&lt;br /&gt;
 	global $a;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
References to variable and to array members are fully supported:&lt;br /&gt;
 $a = &amp;amp;$b;&lt;br /&gt;
 $c = &amp;amp;$c[5];&lt;br /&gt;
&lt;br /&gt;
*Reference of variable by name like $$var is not supported.&lt;br /&gt;
*Integer variables are 64-bit unsigned integers&lt;br /&gt;
*Variable substitution inside of &amp;quot;&amp;quot; is not supported.&lt;br /&gt;
&lt;br /&gt;
==== Operators ====&lt;br /&gt;
All PHP operators supported. Implicit type conversion is supported too, as common in scripting languages. This way 1 + &amp;quot;2&amp;quot; = 3.&lt;br /&gt;
*Prefix and postfix ++ and -- are not distinguished (prefix form used)&lt;br /&gt;
*Using operator + for array mean &amp;quot;join&amp;quot; in real PHP. Here array is interpreted as integer equal to number of elements.&lt;br /&gt;
&lt;br /&gt;
==== Subroutines ====&lt;br /&gt;
'''function''' construct is fully supported. In contrary to regular PHP function must be defined prior calling. It is error to do otherwise. Functions can be recursive, thou.&lt;br /&gt;
Real PHP allows to omit parameters for function calls (default parameters). aMuleWeb PHP does not support this conventions, which mean that all parameters must be present when function is called. This is not an error, and parameters will receive predefined values when omit: 0 for numbers, &amp;quot;&amp;quot; (empty string) for strings.&lt;br /&gt;
Parameters can be references or arrays with usual meaning.&lt;br /&gt;
*Function can not return reference.&lt;br /&gt;
&lt;br /&gt;
=== Library ===&lt;br /&gt;
PHP language is known to have huge library of useful subroutines. Those subroutines are used to perform various tasks, varying from simple string manipulation to complex databases and OS binding. aMuleWeb PHP on the other hand, have very limited library. &lt;br /&gt;
There's several reasons behind this fact. First of all, it is out of question to completely re-create PHP library, given it's size and complexity. Second, and most important, it's not really needed. aMuleWeb PHP is built to serve very specific application, and used to create very specific kind of pages. It will not be used to create e-commerce site or webmail. List below summarize supported functions:&lt;br /&gt;
&lt;br /&gt;
*var_dump($var): [http://www.zend.com/manual/function.var-dump.php var_dump()]&lt;br /&gt;
*strlen($string):[http://www.zend.com/manual/function.strlen.php strlen()]&lt;br /&gt;
*usort($var): [http://www.zend.com/manual/function.usort.php usort()]&lt;br /&gt;
*isset($var): [http://www.zend.com/manual/function.isset.php isset()]&lt;br /&gt;
&lt;br /&gt;
==== Predefined global variables ====&lt;br /&gt;
Similarly to real PHP, there's set of special, or predefined variables, which have special meaning. Those variables may indicate input received from user, or they may control script execution. Those variables have same name as in real PHP, but functionality may be limited.&lt;br /&gt;
&lt;br /&gt;
'''''$_SESSION''''': Hash of values that survive between engine invocation per session. Some of it's values are predefined by webserver itself.&lt;br /&gt;
$_SESSION[&amp;quot;guest_login&amp;quot;]: set when password supplied belongs to low-right user&lt;br /&gt;
$_SESSION[&amp;quot;login_error&amp;quot;]: set when bad password supplied.&lt;br /&gt;
$_SESSION[&amp;quot;auto_refresh&amp;quot;]: always set; indicate time to autorefresh (in seconds). Can be used in http-equiv:&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
        if ( $_SESSION[&amp;quot;auto_refresh&amp;quot;] &amp;gt; 0 ) {&lt;br /&gt;
                echo &amp;quot;&amp;lt;meta http-equiv=\&amp;quot;refresh\&amp;quot; content=\&amp;quot;&amp;quot;, $_SESSION[&amp;quot;auto_refresh&amp;quot;], '&amp;quot;&amp;gt;';&lt;br /&gt;
        }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
'''''$HTTP_GET_VARS''''': Hash of values passed from browser on GET or POST method.&lt;br /&gt;
&lt;br /&gt;
=== aMule binding ===&lt;br /&gt;
The whole purpose of [[aMuleWeb]] control [[aMule]]. aMuleWeb PHP provide library functions for convinient access to underlying aMule datastructure for both queries and actions.&lt;br /&gt;
&lt;br /&gt;
'''''amule_load_vars''''': Query [[aMule]] datastructure. Result is returned as array of hashes, where each hash represent item in [[aMule]] datastructure (upload, download, client, item in search result). Following are possible category names:&lt;br /&gt;
# 'downloads'&lt;br /&gt;
# 'uploads'&lt;br /&gt;
# 'searchresult'&lt;br /&gt;
# 'shared'&lt;br /&gt;
# 'servers'&lt;br /&gt;
# 'stats_graph'&lt;br /&gt;
# 'stats_tree'&lt;br /&gt;
&lt;br /&gt;
 $var = amule_load_vars($name_of_variable)&lt;br /&gt;
 foreach ($var as $i) {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''''amule_get_categories'''': return list of valid categories&lt;br /&gt;
 $cat_list = amule_get_categories();&lt;br /&gt;
 &lt;br /&gt;
'''''amule_get_options'''': return options and their values. Options are returned in form of hash, where keys are categories and values are hashes of name-value for each option.&lt;br /&gt;
'''''amule_set_options($opt_values_hash)'''': set [[aMule]] options. Receives hash in form returned by '''''amule_get_options''''&lt;br /&gt;
&lt;br /&gt;
'''''amule_do_server_cmd'''':&lt;br /&gt;
'''''amule_do_add_server_cmd'''':&lt;br /&gt;
'''''amule_do_download_cmd'''':&lt;br /&gt;
'''''amule_do_shared_cmd'''':&lt;br /&gt;
'''''amule_do_reload_shared_cmd'''':&lt;br /&gt;
'''''amule_do_search_download_cmd'''':&lt;br /&gt;
'''''amule_do_search_start_cmd'''':&lt;br /&gt;
'''''amule_do_ed2k_download_cmd'''':&lt;br /&gt;
'''''amule_get_log'''': query log from [[aMule]]&lt;br /&gt;
 $log = amule_get_log();&lt;br /&gt;
 echo &amp;quot;My log:&amp;quot;, $log;&lt;br /&gt;
'''''amule_get_serverinfo'''':&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authentication ===&lt;br /&gt;
Real PHP have wide range of authentication and session management possibilities. In aMuleWeb PHP, status is different. Both authentication and session management are not part of scripting language. Instead, they are implemented as part of in webserver itself, and running invisibly for script engine.&lt;br /&gt;
&lt;br /&gt;
=== Errors and debugging ===&lt;br /&gt;
As in any other language, aMuleWeb PHP have 3 types of errors: compile-time, run-time and logic errors. All error messages produced by engine are printed to terminal. This effectively means, that [[aMuleWeb]] should be started manually from terminal (and not automatically by [[aMule]]) in order to see those messages. Alghouth engine perform some effort to recover from syntax errors, it's known to crash in some corner-cases. Beware.&lt;br /&gt;
*Compile-time errors means error in script syntax as misspelled names, missing &amp;quot;;&amp;quot; or mismatched (). In this case, error message from parser is printed and execution is not performed. &lt;br /&gt;
*Run-time errors like division by zero, incorrect or missing parameters etc. When encountered, appropriate message is printed, and execution aborted in point of problem.&lt;br /&gt;
*Logic errors: everything is OK, but result is different from expected. Since aMuleWeb PHP offers no debugger, the only way to trace program is to add '''var_dump()''' in suspicious places;&lt;br /&gt;
&lt;br /&gt;
It is possible to compile aMuleWeb PHP engine standalone. This compilation mode is used to debug '''engine itself'''. Since aMule binding is not possible in this case, it have little use for template debugging.&lt;/div&gt;</summary>
		<author><name>87.69.41.166</name></author>	</entry>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/AMuleWeb_PHP</id>
		<title>AMuleWeb PHP</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/AMuleWeb_PHP"/>
				<updated>2006-10-17T19:53:07Z</updated>
		
		<summary type="html">&lt;p&gt;87.69.41.166: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;aMuleWeb PHP manual&amp;lt;/h1&amp;gt; ''by  Froenchenko Leonid lfroen@gmail.com [[User:Lfroen|Lfroen]]''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;This page is in unfinished state. Information may be missing, inaccurate, missmelled or all of them&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
[[aMuleWeb]] is an add-on program, used together with [[aMule]] and serves as webserver, allowing user to control aMule through browser interface. aMuleWeb works very similar to regular and wide-known webservers such as Apache[http://www.apache.org] - set of HTML pages stored on server side (called &amp;quot;template&amp;quot;). Those pages contains embedded server-side script, which is running when user requests the page. Resulting page is returned to user.&lt;br /&gt;
&lt;br /&gt;
The scripting language, [[aMuleWeb]] using is very similar to widely known &amp;quot;PHP&amp;quot;, developed and distributed by Zend company [http://www.zend.com]. Since aMuleWeb implementation is differ from original PHP, I will call it &amp;quot;aMuleWeb PHP&amp;quot; for reader convenience. &amp;quot;The PHP&amp;quot; language, will be referred as &amp;quot;real PHP&amp;quot; or just &amp;quot;PHP&amp;quot; to make difference between the two.&lt;br /&gt;
&lt;br /&gt;
=== Conventions ===&lt;br /&gt;
Language elements, reserved words are marked bold: '''keyword'''. Things that are not part of syntax, but are reserved or predefined marked bold italic: '''''special_var''. Languge limitations marked like:&lt;br /&gt;
*Making cofee not supported&lt;br /&gt;
&lt;br /&gt;
=== Interaction with PHP and webserver ===&lt;br /&gt;
Similarly to real PHP, script is embedded into regular HTML pages using &amp;lt;?php ?&amp;gt; marks. Page must have .php extension in order to be searched for script. Note, that markups can not be nested, i.e. placing &amp;lt;html&amp;gt; marks inside of &amp;lt;?php ?&amp;gt; will result in syntax error.&lt;br /&gt;
&lt;br /&gt;
=== Core language constructs ===&lt;br /&gt;
aMuleWeb PHP have same basic language elements as real PHP version 5. Several things supported or implemented differently:&lt;br /&gt;
OO constructs (classes) may pass syntax check, but they are not supported in any way.&lt;br /&gt;
'''include''' construct is parse-time directive (in contrary to PHP, where you can do it in run-time and check result of &amp;quot;include&amp;quot; operation)&lt;br /&gt;
There's no '''list''' at all.&lt;br /&gt;
&lt;br /&gt;
==== Variables ====&lt;br /&gt;
There's scalar (referred as $var) and array (referred as @var) variables. Similarly to real PHP all variables are local, unless defined otherwise.&lt;br /&gt;
Variables, marked as '''global''' must be declated ''before'' this definition. Example:&lt;br /&gt;
&lt;br /&gt;
 $a = 1;&lt;br /&gt;
&lt;br /&gt;
 function foo()&lt;br /&gt;
 {&lt;br /&gt;
 	global $a;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
References to variable and to array members are fully supported:&lt;br /&gt;
 $a = &amp;amp;$b;&lt;br /&gt;
 $c = &amp;amp;$c[5];&lt;br /&gt;
&lt;br /&gt;
*Reference of variable by name like $$var is not supported.&lt;br /&gt;
*Integer variables are 64-bit unsigned integers&lt;br /&gt;
*Variable substitution inside of &amp;quot;&amp;quot; is not supported.&lt;br /&gt;
&lt;br /&gt;
==== Operators ====&lt;br /&gt;
All PHP operators supported. Implicit type conversion is supported too, as common in scripting languages. This way 1 + &amp;quot;2&amp;quot; = 3.&lt;br /&gt;
*Prefix and postfix ++ and -- are not distinguished (prefix form used)&lt;br /&gt;
*Using operator + for array mean &amp;quot;join&amp;quot; in real PHP. Here array is interpreted as integer equal to number of elements.&lt;br /&gt;
&lt;br /&gt;
==== Subroutines ====&lt;br /&gt;
'''function''' construct is fully supported. In contrary to regular PHP function must be defined prior calling. It is error to do otherwise. Functions can be recursive, thou.&lt;br /&gt;
Real PHP allows to omit parameters for function calls (default parameters). aMuleWeb PHP does not support this conventions, which mean that all parameters must be present when function is called. This is not an error, and parameters will receive predefined values when omit: 0 for numbers, &amp;quot;&amp;quot; (empty string) for strings.&lt;br /&gt;
Parameters can be references or arrays with usual meaning.&lt;br /&gt;
*Function can not return reference.&lt;br /&gt;
&lt;br /&gt;
=== Library ===&lt;br /&gt;
PHP language is known to have huge library of useful subroutines. Those subroutines are used to perform various tasks, varying from simple string manipulation to complex databases and OS binding. aMuleWeb PHP on the other hand, have very limited library. &lt;br /&gt;
There's several reasons behind this fact. First of all, it is out of question to completely re-create PHP library, given it's size and complexity. Second, and most important, it's not really needed. aMuleWeb PHP is built to serve very specific application, and used to create very specific kind of pages. It will not be used to create e-commerce site or webmail. List below summarize supported functions:&lt;br /&gt;
&lt;br /&gt;
*var_dump($var): [http://www.zend.com/manual/function.var-dump.php var_dump()]&lt;br /&gt;
*strlen($string):[http://www.zend.com/manual/function.strlen.php strlen()]&lt;br /&gt;
*usort($var): [http://www.zend.com/manual/function.usort.php usort()]&lt;br /&gt;
*isset($var): [http://www.zend.com/manual/function.isset.php isset()]&lt;br /&gt;
&lt;br /&gt;
==== Predefined global variables ====&lt;br /&gt;
Similarly to real PHP, there's set of special, or predefined variables, which have special meaning. Those variables may indicate input received from user, or they may control script execution. Those variables have same name as in real PHP, but functionality may be limited.&lt;br /&gt;
&lt;br /&gt;
'''''$_SESSION''''': Hash of values that survive between engine invocation per session. Some of it's values are predefined by webserver itself.&lt;br /&gt;
$_SESSION[&amp;quot;guest_login&amp;quot;]: set when password supplied belongs to low-right user&lt;br /&gt;
$_SESSION[&amp;quot;login_error&amp;quot;]: set when bad password supplied.&lt;br /&gt;
$_SESSION[&amp;quot;auto_refresh&amp;quot;]: always set; indicate time to autorefresh (in seconds). Can be used in http-equiv:&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
        if ( $_SESSION[&amp;quot;auto_refresh&amp;quot;] &amp;gt; 0 ) {&lt;br /&gt;
                echo &amp;quot;&amp;lt;meta http-equiv=\&amp;quot;refresh\&amp;quot; content=\&amp;quot;&amp;quot;, $_SESSION[&amp;quot;auto_refresh&amp;quot;], '&amp;quot;&amp;gt;';&lt;br /&gt;
        }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
'''''$HTTP_GET_VARS''''': Hash of values passed from browser on GET or POST method.&lt;br /&gt;
&lt;br /&gt;
=== aMule binding ===&lt;br /&gt;
The whole purpose of [[aMuleWeb]] control [[aMule]]. aMuleWeb PHP provide library functions for convinient access to underlying aMule datastructure for both queries and actions.&lt;br /&gt;
&lt;br /&gt;
'''''amule_load_vars''''': Query [[aMule]] datastructure. Result is returned as array of hashes, where each hash represent item in [[aMule]] datastructure (upload, download, client, item in search result). Following are possible category names:&lt;br /&gt;
# 'downloads'&lt;br /&gt;
# 'uploads'&lt;br /&gt;
# 'searchresult'&lt;br /&gt;
# 'shared'&lt;br /&gt;
# 'servers'&lt;br /&gt;
# 'stats_graph'&lt;br /&gt;
# 'stats_tree'&lt;br /&gt;
&lt;br /&gt;
 $var = amule_load_vars($name_of_variable)&lt;br /&gt;
 foreach ($var as $i) {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''''amule_get_categories'''': return list of valid categories&lt;br /&gt;
 $cat_list = amule_get_categories();&lt;br /&gt;
 &lt;br /&gt;
'''''amule_get_options'''': return options and their values. Options are returned in form of hash, where keys are categories and values are hashes of name-value for each option.&lt;br /&gt;
'''''amule_set_options($opt_values_hash)'''': set [[aMule]] options. Receives hash in form returned by '''''amule_get_options''''&lt;br /&gt;
&lt;br /&gt;
'''''amule_do_server_cmd'''':&lt;br /&gt;
'''''amule_do_add_server_cmd'''':&lt;br /&gt;
'''''amule_do_download_cmd'''':&lt;br /&gt;
'''''amule_do_shared_cmd'''':&lt;br /&gt;
'''''amule_do_reload_shared_cmd'''':&lt;br /&gt;
'''''amule_do_search_download_cmd'''':&lt;br /&gt;
'''''amule_do_search_start_cmd'''':&lt;br /&gt;
'''''amule_do_ed2k_download_cmd'''':&lt;br /&gt;
'''''amule_get_log'''': query log from [[aMule]]&lt;br /&gt;
 $log = amule_get_log();&lt;br /&gt;
 echo &amp;quot;My log:&amp;quot;, $log;&lt;br /&gt;
'''''amule_get_serverinfo'''':&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authentication ===&lt;br /&gt;
Real PHP have wide range of authentication and session management possibilities. In aMuleWeb PHP, status is different. Both authentication and session management are not part of scripting language. Instead, they are implemented as part of in webserver itself, and running invisibly for script engine.&lt;br /&gt;
&lt;br /&gt;
=== Errors and debugging ===&lt;br /&gt;
As in any other language, aMuleWeb PHP have 3 types of errors: compile-time, run-time and logic errors. All error messages produced by engine are printed to terminal. This effectively means, that [[aMuleWeb]] should be started manually from terminal (and not automatically by [[aMule]]) in order to see those messages. Alghouth engine perform some effort to recover from syntax errors, it's known to crash in some corner-cases. Beware.&lt;br /&gt;
*Compile-time errors means error in script syntax as misspelled names, missing &amp;quot;;&amp;quot; or mismatched (). In this case, error message from parser is printed and execution is not performed. &lt;br /&gt;
*Run-time errors like division by zero, incorrect or missing parameters etc. When encountered, appropriate message is printed, and execution aborted in point of problem.&lt;br /&gt;
*Logic errors: everything is OK, but result is different from expected. Since aMuleWeb PHP offers no debugger, the only way to trace program is to add '''var_dump()''' in suspicious places;&lt;br /&gt;
&lt;br /&gt;
It is possible to compile aMuleWeb PHP engine standalone. This compilation mode is used to debug '''engine itself'''. Since aMule binding is not possible in this case, it have little use for template debugging.&lt;/div&gt;</summary>
		<author><name>87.69.41.166</name></author>	</entry>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/AMuleWeb</id>
		<title>AMuleWeb</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/AMuleWeb"/>
				<updated>2006-10-17T19:52:30Z</updated>
		
		<summary type="html">&lt;p&gt;87.69.41.166: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
aMuleWeb is a utility that listens for [http://www.w3.org/MarkUp HTTP] connections at port 4711 (by default, although it can be changed through '''Preferences''') and allows remote users to control [[aMule]] using just a web browser. &lt;br /&gt;
&lt;br /&gt;
[[aMule]] itself doesn't support listening to [http://www.w3.org/MarkUp HTTP] connections, so the external utility aMuleWeb is used. This utility listens for remote connections, and once the link between aMuleWeb and the remote user is established, it connects to the [[aMule]] main program using the [[External Connections]] mechanism.&lt;br /&gt;
&lt;br /&gt;
== Compiling aMuleWeb ==&lt;br /&gt;
&lt;br /&gt;
[[Compile]] [[aMule]] normally, just add ''--enable-amuleweb'' when running ''configure''.&lt;br /&gt;
&lt;br /&gt;
== Setting up aMuleWeb with [[aMule]] ==&lt;br /&gt;
&lt;br /&gt;
=== aMuleWeb with [[aMule]] 2.0.0 or later ===&lt;br /&gt;
&lt;br /&gt;
*For users running the monotlithic [[aMule]] application:&lt;br /&gt;
**Go to &amp;quot;Preferences&amp;quot;-&amp;gt;&amp;quot;Remote Controls&amp;quot; (in [[aMule]]) and...&lt;br /&gt;
***Enable &amp;quot;Accept External Connections&amp;quot;.&lt;br /&gt;
***Enable &amp;quot;Use TCP ports instead of unix local sockets&amp;quot; (This option doesn't exist since version 2.1.0)&lt;br /&gt;
***Enter a password for [[External Connections]]. If you don't do this, aMuleWeb will not communicate with [[aMule]].&lt;br /&gt;
::'''NOTE:''' When you change your aMuleWeb and [[External Connections]] ports here, make sure to restart [[aMule]].&lt;br /&gt;
&lt;br /&gt;
*For users running the [[aMule|aMule daemon]]:&lt;br /&gt;
**Shutdown [[aMule|aMuled]] if it is still running.&lt;br /&gt;
**Run ''amuleweb -w'' to generate ''~/.aMule/remote.conf'' and edit it for these options. It previously were on ''~/.aMule/amule.conf'', but the lines are still on this file, so edit both if in doubt.&lt;br /&gt;
***''[ExternalConnect]'' &amp;lt;- Section header&lt;br /&gt;
***''AcceptExternalConnections=1'' &amp;lt;-- To enable [[aMule]] listening for [[External Connections]].&lt;br /&gt;
***''ECUseTCPPort=1'' &amp;lt;-- To use the [http://www.faqs.org/faqs/internet/tcp-ip/resource-list TCP] port. Very important since [http://www.unix.org Unix] sockets are disabled.&lt;br /&gt;
***''ECPassword=ca3c365274907c6fd527068788e14639'' &amp;lt;-- To find the MD5 string for your password, do:&lt;br /&gt;
:::''$ echo -n yourpasswordhere | md5sum | cut -d ' ' -f 1''&lt;br /&gt;
:::''ca3c365274907c6fd527068788e14639''&lt;br /&gt;
**If you get ''FATAL ERROR: Cannot find template: default'' it's because you didn't run ''make install''. If you don't want to install aMule, copy the ''src/webserver/default/'' directory into ''~/.aMule/webserver/'' (create it if needed). If you want any other template (probably ''php-default''), copy it too. Then go back to the previous step.&lt;br /&gt;
**Restart [[aMule|aMule]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Every password must be md5sum,also webserver one/s. aMule embedded webserver works without remote.conf,you just need to edit ''amule.conf''. A good trick if you have somewhere an X server is to configure amule using the GUI and then copy the ''amule.conf'' configuration file where you want to run the daemon.&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:Stefanero|Stefanero]], from who I shamelessly stole a lot from his tutorial.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' aMuleWeb uses cookies to hold session id. Make sure that cookies are enabled in your browser.&lt;br /&gt;
&lt;br /&gt;
=== aMuleWeb with [[aMule]] pre-2.0.0 final ===&lt;br /&gt;
&lt;br /&gt;
Please check [[Webserver-old|this page]] for archived instructions (educational purposes!).&lt;br /&gt;
&lt;br /&gt;
== Running aMuleWeb ==&lt;br /&gt;
There's 2 options for activating aMuleWeb. &lt;br /&gt;
*First, and preffered, is to enable aMuleWeb activation on aMule preferences. This option works for amuled as well. When started, aMule will attempt to execute '''amuleweb''' command, asuming it's in the search path. Upon exit, aMuleWeb will be automatically terminated.&lt;br /&gt;
*Second options is to run aMuleWeb manually, using '''''amuleweb''''' command on a terminal.&lt;br /&gt;
&lt;br /&gt;
Once aMuleWeb is running, open a web browser and connect to:&lt;br /&gt;
&lt;br /&gt;
''http://host:port''&lt;br /&gt;
&lt;br /&gt;
where ''host'' stands for your host's name (try with ''localhost'') and port stands for the aMuleWeb port ('''NOT''' the [[External Connections]] port).&lt;br /&gt;
&lt;br /&gt;
For example: ''http://localhost:4711''&lt;br /&gt;
&lt;br /&gt;
''Shakraw''&lt;br /&gt;
&lt;br /&gt;
== Standard ports ==&lt;br /&gt;
&lt;br /&gt;
The ports can be set to anything, but this are the most used (the standard ones):&lt;br /&gt;
&lt;br /&gt;
*[[External Connections]]: 4712&lt;br /&gt;
*amuleweb: 4711&lt;br /&gt;
&lt;br /&gt;
Make sure you do not confuse with what each of them is.&lt;br /&gt;
&lt;br /&gt;
== Template (skin) location ==&lt;br /&gt;
&lt;br /&gt;
aMuleWeb looks for its files in a number of places:&lt;br /&gt;
*In your home directory: ''$HOME/.aMule/webserver/''[skin name]''/''&lt;br /&gt;
*And at it's install location, in this order (by default, ''/usr/local/share/amule/webserver'' if you compiled [[aMule]], or ''/usr/share/amule/webserver'' if you installed it from a package).&lt;br /&gt;
&lt;br /&gt;
Default template name is 'default'.&lt;br /&gt;
&lt;br /&gt;
If, '''after installing''' [[aMule]], aMuleWeb refuses to run because of not being able to load template:&lt;br /&gt;
*Please report this situation to us, and then&lt;br /&gt;
*Create the directories ''webserver/default'' in the ''.aMule'' subdirectory of your home directory, and copy the contents of the ''src/webserver'' directory there from the [[aMule]] tarball (I mean to ''$HOME/.aMule/webserver/default'').&lt;br /&gt;
&lt;br /&gt;
'''[[User:GonoszTopi|GonoszTopi]]'''&lt;br /&gt;
&lt;br /&gt;
== How to start [[aMuled|aMule Daemon]] and aMuleWeb with your computer ==&lt;br /&gt;
&lt;br /&gt;
The best way to start both the processes aMule Daemon and aMuleWeb with your server is to add a shell script ''/etc/init.d/amule'' like this:&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin&lt;br /&gt;
 DAEMON=/usr/bin/amuled&lt;br /&gt;
 WEB=/usr/bin/amuleweb&lt;br /&gt;
 NAME=amuled&lt;br /&gt;
 DESC=amuled&lt;br /&gt;
 RUNAMULE=no&lt;br /&gt;
 USER=youramuleuser&lt;br /&gt;
 &lt;br /&gt;
 test -x $DAEMON || exit 0&lt;br /&gt;
 &lt;br /&gt;
 # Include amule defaults if available&lt;br /&gt;
 if [ -f /etc/default/amule ] ; then&lt;br /&gt;
     . /etc/default/amule&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 if [ &amp;quot;$RUNAMULE&amp;quot; != &amp;quot;yes&amp;quot; ];then&lt;br /&gt;
     echo &amp;quot;Amule not to be started. Edit /etc/default/amule first.&amp;quot;&lt;br /&gt;
     exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 set -e&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
   start)&lt;br /&gt;
     echo -n &amp;quot;Starting $DESC: &amp;quot;&lt;br /&gt;
        su $USER -c &amp;quot;$DAEMON -f&amp;quot;&lt;br /&gt;
        sleep 20&lt;br /&gt;
        su $USER -c &amp;quot;$WEB --quiet &amp;amp;&amp;quot;&lt;br /&gt;
     echo &amp;quot;$NAME.&amp;quot;&lt;br /&gt;
     ;;&lt;br /&gt;
   stop)&lt;br /&gt;
     echo -n &amp;quot;Stopping $DESC: &amp;quot;&lt;br /&gt;
        killall --quiet --ignore-case $WEB&lt;br /&gt;
        killall --quiet --ignore-case $DAEMON&lt;br /&gt;
     echo &amp;quot;$NAME.&amp;quot;&lt;br /&gt;
     ;;&lt;br /&gt;
   restart|force-reload)&lt;br /&gt;
     echo -n &amp;quot;Restarting $DESC: &amp;quot;&lt;br /&gt;
        killall --quiet --ignore-case $WEB&lt;br /&gt;
        killall --quiet --ignore-case $DAEMON&lt;br /&gt;
     sleep 1&lt;br /&gt;
        su $USER -c &amp;quot;$DAEMON -f&amp;quot;&lt;br /&gt;
        sleep 20&lt;br /&gt;
        su $USER -c &amp;quot;$WEB --quiet &amp;amp;&amp;quot;&lt;br /&gt;
     echo &amp;quot;$NAME.&amp;quot;&lt;br /&gt;
     ;;&lt;br /&gt;
   *)&lt;br /&gt;
     N=/etc/init.d/$NAME&lt;br /&gt;
     echo &amp;quot;Usage: $N {start|stop|restart|force-reload}&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
     exit 1&lt;br /&gt;
     ;;&lt;br /&gt;
 esac&lt;br /&gt;
 &lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
Then just set that script to be run at start up. On [[Debian]] this would be doen with the following command:&lt;br /&gt;
&lt;br /&gt;
 update-rc.d amule defaults&lt;br /&gt;
&lt;br /&gt;
Then, for the deamons to start you just have to create a file ''/etc/default/amule'' which contains a single line:&lt;br /&gt;
&lt;br /&gt;
 RUNAMULE=yes&lt;br /&gt;
&lt;br /&gt;
That's it!&lt;br /&gt;
&lt;br /&gt;
== Template language and development  ==&lt;br /&gt;
Simply put, aMuleWeb templates are ordinary HTML files. In order to make them &amp;quot;interactive&amp;quot;, server-side language is embedded inside. This language is scaled down dialect of PHP. More detailed information can be found on [[aMuleWeb_PHP]].&lt;br /&gt;
&lt;br /&gt;
== Where to report problems and questions? ==&lt;br /&gt;
&lt;br /&gt;
For Problems or Questions just report on http://forum.amule.org forum or join [[IRC]] channel [irc://irc.freenode.net/amule #amule] at [irc://irc.freenode.net irc.freenode.net]&lt;br /&gt;
&lt;br /&gt;
== Other sources of information ==&lt;br /&gt;
&lt;br /&gt;
Read the aMuleWeb man page, which is available in English, French, German, Hungarian and Spanish.&lt;br /&gt;
&lt;br /&gt;
For further information read the [[FAQ_webserver|aMuleWeb FAQ]].&lt;/div&gt;</summary>
		<author><name>87.69.41.166</name></author>	</entry>

	</feed>