first of all, php is pretty easy to learn, and i'm no great expert, but here's my understanding of the code.
First, make sure you understand that all PHP variables being with $. For example a variable with the name "monkey" would be "$monkey", not simply "monkey".
Everything above "MAIN" seems to be all the functions to manipulate the image. Right below "MAIN" are configuration array variables. This should be straightfoward up until now.
now, in this line:
PHP Code:
$out=isset($_REQUEST['out'])?$_REQUEST['out']:$conf['default_output_format'];
The isset() function returns true if the variable is set. What we're checking here is if the variable named 'out' is set. 'out' is part of an array, namely $_REQUEST[]. This variable was past to the file through the HTML FORM after the user clicked the "Parse" button. Whenever HTML forms are sent, data is sent to the php file in arrays. The creator of this script chose to use the array $_REQUEST, but you can also use $_GET or $_POST. (If you scroll down to the bottom of the script, you can see that there are <input> HTML tags with names such as "out" or "filename")
The same reasoning applies to $filename.
Below all this, the image parsing functions are called, and then the correct display function is called (based on what the user put in the selection box).
At the beginning of the print_output_html() function, we see:
PHP Code:
$ret = '';
$ret.='<html>';
$ret.='<body>';
$ret.='<center>';
I'm not sure how java concatenates strings, but PHP concatenates by using the "." (period). The rest of the page is simply more outputing functions.
I didn't look at all the image parsing functions, but in the "MAIN" section, the first image parsing function called is not surprisingly: parse_image()
Hopes that helps. I might try to look at the image parsing functions later, but no guarantees