// Extract host name from script
$host = extractHostnameFromUrl($script);
- // Construct request
+ // Construct request body
$body = http_build_query($postData, '', '&');
// Generate POST request header
$request .= 'Host: ' . $host . getConfig('HTTP_EOL');
$request .= 'Referer: ' . getConfig('URL') . '/admin.php' . getConfig('HTTP_EOL');
$request .= 'User-Agent: ' . getConfig('TITLE') . '/' . getConfig('FULL_VERSION') . getConfig('HTTP_EOL');
+ $request .= 'Accept: text/plain;q=0.8' . getConfig('HTTP_EOL');
+ $request .= 'Accept-Charset: UTF-8,*' . getConfig('HTTP_EOL');
$request .= 'Cache-Control: no-cache' . getConfig('HTTP_EOL');
$request .= 'Content-Type: application/x-www-form-urlencoded' . getConfig('HTTP_EOL');
+ $request .= 'Content-Length: ' . strlen($body) . getConfig('HTTP_EOL');
$request .= 'Connection: close' . getConfig('HTTP_EOL');
$request .= getConfig('HTTP_EOL');
}
} // END - foreach
+ //* DEBUG: */ print('<strong>Request:</strong><pre>'.print_r($request, true).'</pre>');
//* DEBUG: */ print('<strong>Response:</strong><pre>'.print_r($response, true).'</pre>');
// Proxy agent found or something went wrong?
//* DEBUG: */ outputHtml(__FUNCTION__.':'.strlen($passHash).'/'.strlen(getConfig('secret_key')).'<br />');
if ((strlen($passHash) != 49) || (strlen(getConfig('secret_key')) != 40)) {
// Both keys must have same length so return unencrypted
+ logDebugMessage(__FUNCTION__, __LINE__, strlen($passHash).'!=49/'.strlen(getConfig('secret_key')).'!=40');
return $ret;
} // END - if
// Make sure, that the script realy realy diese here and now
$GLOBALS['app_died'] = true;
- // Set content type if not set
- if (!isContentTypeSet()) {
- // text/html is the right one
- setContentType('text/html');
- } // END - if
+ // Set content type as text/html
+ setContentType('text/html');
// Load header
loadIncludeOnce('inc/header.php');