
16.07.2007, 19:21
|
|
Флудер
Регистрация: 20.11.2006
Сообщений: 3,316
Провел на форуме: 16641028
Репутация:
2371
|
|
Почти такое же на PHP:
PHP код:
<form method="POST">
<input type="text" name="func" value="Function" />
<input type="submit" name="subm" value="Click.." />
</form>
<?php
if($_POST['subm'])
{
$process_match[1] = $_POST['func'];
$file = file_get_contents("http://ru.php.net/manual/ru/function.".$process_match[1].".php");
$file = str_replace("\n", "", $file);
$file = iconv("UTF-8", "WINDOWS-1251", $file);
preg_match("|<!--/UdmComment--><H1>(.*)</H1>.*<P>(.*)</P>(.*)</DIV>(.*)<H2>(.*)</H2>(.*)
|isU", $file, $out);
$out[6] = str_replace("Замечание:", "\r\nЗамечание: ", $out[6]);
if ($out[1]) {
$send = strip_tags("Функция: ".$out[1]."\r\n".$out[2]."\r\n".$out[3]."\r\nОписание: ".$out[4].$out[6]);
} else {
$send = "Функция не найдена!";
}
$send = str_replace(array(">", "&", " "), array(">", "&", ""), $send);
$send = html_entity_decode($send);
echo $send;
} else {
echo 'Поле пустое';
?>
Правда в этом скрипте 1 язык русский и строк 15, а в делфи больше возможностей, но срок ~270
Последний раз редактировалось Isis; 16.07.2007 в 19:24..
|
|
|